Module: kamailio
Branch: 4.4
Commit: 1765576b013524e73131b9adb4d4ccb78de43658
URL:
https://github.com/kamailio/kamailio/commit/1765576b013524e73131b9adb4d4ccb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Date: 2017-07-24T15:19:03+02:00
tsilo: check return code for parse_uri()
(cherry picked from commit a19a06f6c302a7fbac9b137cc1558d47730ead2f)
---
Modified: modules/tsilo/ts_append.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1765576b013524e73131b9adb4d4ccb…
Patch:
https://github.com/kamailio/kamailio/commit/1765576b013524e73131b9adb4d4ccb…
---
diff --git a/modules/tsilo/ts_append.c b/modules/tsilo/ts_append.c
index db47fdfad7..b0c605a0ee 100644
--- a/modules/tsilo/ts_append.c
+++ b/modules/tsilo/ts_append.c
@@ -51,9 +51,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;
}