[sr-dev] git:master:a19a06f6: tsilo: check return code for parse_uri()
Daniel-Constantin Mierla
miconda at gmail.com
Thu Jul 20 20:36:51 CEST 2017
Module: kamailio
Branch: master
Commit: a19a06f6c302a7fbac9b137cc1558d47730ead2f
URL: https://github.com/kamailio/kamailio/commit/a19a06f6c302a7fbac9b137cc1558d47730ead2f
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-07-20T20:34:57+02:00
tsilo: check return code for parse_uri()
---
Modified: src/modules/tsilo/ts_append.c
---
Diff: https://github.com/kamailio/kamailio/commit/a19a06f6c302a7fbac9b137cc1558d47730ead2f.diff
Patch: https://github.com/kamailio/kamailio/commit/a19a06f6c302a7fbac9b137cc1558d47730ead2f.patch
---
diff --git a/src/modules/tsilo/ts_append.c b/src/modules/tsilo/ts_append.c
index 0076634109..e6e27e40cc 100644
--- a/src/modules/tsilo/ts_append.c
+++ b/src/modules/tsilo/ts_append.c
@@ -50,9 +50,12 @@ int ts_append(struct sip_msg* msg, str *ruri, char *table) {
if (use_domain) {
t_uri = ruri;
- }
- else {
- parse_uri(ruri->s, ruri->len, &p_uri);
+ } else {
+ if(parse_uri(ruri->s, ruri->len, &p_uri)<0) {
+ LM_ERR("failed to parse uri %.*s\n", ruri->len, ruri->s);
+ unlock_entry_by_ruri(ruri);
+ return -1;
+ }
t_uri = &p_uri.user;
}
More information about the sr-dev
mailing list