Module: kamailio
Branch: 5.0
Commit: 3bfc9d4955cf3edd64fe29aa3e88d23609360209
URL:
https://github.com/kamailio/kamailio/commit/3bfc9d4955cf3edd64fe29aa3e88d23…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Date: 2017-07-24T15:18:29+02:00
tsilo: check return code for parse_uri()
(cherry picked from commit a19a06f6c302a7fbac9b137cc1558d47730ead2f)
---
Modified: src/modules/tsilo/ts_append.c
---
Diff:
https://github.com/kamailio/kamailio/commit/3bfc9d4955cf3edd64fe29aa3e88d23…
Patch:
https://github.com/kamailio/kamailio/commit/3bfc9d4955cf3edd64fe29aa3e88d23…
---
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;
}