Module: kamailio
Branch: master
Commit: a19a06f6c302a7fbac9b137cc1558d47730ead2f
URL:
https://github.com/kamailio/kamailio/commit/a19a06f6c302a7fbac9b137cc1558d4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)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/a19a06f6c302a7fbac9b137cc1558d4…
Patch:
https://github.com/kamailio/kamailio/commit/a19a06f6c302a7fbac9b137cc1558d4…
---
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;
}