Module: kamailio
Branch: 5.1
Commit: ff36d82d8861ed50adf91b9e314c29ef8ee3e745
URL:
https://github.com/kamailio/kamailio/commit/ff36d82d8861ed50adf91b9e314c29e…
Author: Dmitri Savolainen <savolainen(a)erinaco.ru>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2018-08-23T20:00:40+02:00
drouting: fix crush for empty username in ruri
- uri like sip:@host crushed kamailio
(cherry picked from commit e4f3849f35ae556e317c365d56b14212e48d1dab)
---
Modified: src/modules/drouting/prefix_tree.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ff36d82d8861ed50adf91b9e314c29e…
Patch:
https://github.com/kamailio/kamailio/commit/ff36d82d8861ed50adf91b9e314c29e…
---
diff --git a/src/modules/drouting/prefix_tree.c b/src/modules/drouting/prefix_tree.c
index 099c402dec..9ce8d04bc6 100644
--- a/src/modules/drouting/prefix_tree.c
+++ b/src/modules/drouting/prefix_tree.c
@@ -98,7 +98,7 @@ rt_info_t *get_prefix(ptree_t *ptree, str *prefix, unsigned int rgid)
if(NULL == ptree)
goto err_exit;
- if(NULL == prefix)
+ if(NULL == prefix || NULL == prefix->s)
goto err_exit;
tmp = prefix->s;
/* go the tree down to the last digit in the