[sr-dev] git:5.0:7ab0b1c0: drouting: fix crush for empty username in ruri
Henning Westerholt
hw at kamailio.org
Thu Aug 23 20:01:13 CEST 2018
Module: kamailio
Branch: 5.0
Commit: 7ab0b1c0fa4028d7d4abb1b621b364584ae0f4b9
URL: https://github.com/kamailio/kamailio/commit/7ab0b1c0fa4028d7d4abb1b621b364584ae0f4b9
Author: Dmitri Savolainen <savolainen at erinaco.ru>
Committer: Henning Westerholt <hw at 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/7ab0b1c0fa4028d7d4abb1b621b364584ae0f4b9.diff
Patch: https://github.com/kamailio/kamailio/commit/7ab0b1c0fa4028d7d4abb1b621b364584ae0f4b9.patch
---
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
More information about the sr-dev
mailing list