Module: kamailio
Branch: 5.0
Commit: 7ab0b1c0fa4028d7d4abb1b621b364584ae0f4b9
URL:
https://github.com/kamailio/kamailio/commit/7ab0b1c0fa4028d7d4abb1b621b3645…
Author: Dmitri Savolainen <savolainen(a)erinaco.ru>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2018-08-23T20:00:58+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/7ab0b1c0fa4028d7d4abb1b621b3645…
Patch:
https://github.com/kamailio/kamailio/commit/7ab0b1c0fa4028d7d4abb1b621b3645…
---
diff --git a/src/modules/drouting/prefix_tree.c b/src/modules/drouting/prefix_tree.c
index 07bd518d64..305ed4f14b 100644
--- a/src/modules/drouting/prefix_tree.c
+++ b/src/modules/drouting/prefix_tree.c
@@ -115,7 +115,7 @@ get_prefix(
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