[Asterisk-code-review] res pjsip mwi: Fix segv caused by 16c7d8e74a9af13f98c3c22aa... (asterisk[master])

George Joseph asteriskteam at digium.com
Mon Apr 4 18:05:46 CDT 2016


George Joseph has uploaded a new change for review.

  https://gerrit.asterisk.org/2530

Change subject: res_pjsip_mwi:  Fix segv caused by 16c7d8e74a9af13f98c3c22aa9c43ce39965f6b7
......................................................................

res_pjsip_mwi:  Fix segv caused by 16c7d8e74a9af13f98c3c22aa9c43ce39965f6b7

I forgot the new voicemail_extension wasn't a stringfield and didn't check
for NULL where I should have.

Change-Id: I029482d5c2ab72474838750461bd46b0809c90fb
---
M res/res_pjsip_mwi.c
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/30/2530/1

diff --git a/res/res_pjsip_mwi.c b/res/res_pjsip_mwi.c
index a954c9c..f9bfc19 100644
--- a/res/res_pjsip_mwi.c
+++ b/res/res_pjsip_mwi.c
@@ -459,7 +459,8 @@
 			continue;
 		}
 
-		if (!strcasecmp(check_aor->voicemail_extension, resource)) {
+		if (!ast_strlen_zero(check_aor->voicemail_extension)
+			&& !strcasecmp(check_aor->voicemail_extension, resource)) {
 			ast_debug(1, "Found an aor (%s) that matches voicemail_extension %s\n", aor_name, resource);
 			return check_aor;
 		}

-- 
To view, visit https://gerrit.asterisk.org/2530
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I029482d5c2ab72474838750461bd46b0809c90fb
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>



More information about the asterisk-code-review mailing list