summaryrefslogtreecommitdiff
path: root/res/res_pjsip_mwi.c
diff options
context:
space:
mode:
authorGeorge Joseph <george.joseph@fairview5.com>2016-04-04 17:02:09 -0600
committerGeorge Joseph <george.joseph@fairview5.com>2016-04-04 18:05:45 -0500
commitc07e1190ec02573d80d007b6d7279b14cde8655b (patch)
tree1d3f3ea3a03cd37512261e1023467d8822ceeb35 /res/res_pjsip_mwi.c
parent86ccd1bd2bc0df8ccb264dd3a082b6a5dfa42111 (diff)
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
Diffstat (limited to 'res/res_pjsip_mwi.c')
-rw-r--r--res/res_pjsip_mwi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_pjsip_mwi.c b/res/res_pjsip_mwi.c
index a954c9c66..f9bfc1904 100644
--- a/res/res_pjsip_mwi.c
+++ b/res/res_pjsip_mwi.c
@@ -459,7 +459,8 @@ static struct ast_sip_aor *find_aor_for_resource(struct ast_sip_endpoint *endpoi
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;
}