]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip_mwi: Fix segv caused by 16c7d8e74a9af13f98c3c22aa9c43ce39965f6b7 30/2530/1
authorGeorge Joseph <george.joseph@fairview5.com>
Mon, 4 Apr 2016 23:02:09 +0000 (17:02 -0600)
committerGeorge Joseph <george.joseph@fairview5.com>
Mon, 4 Apr 2016 23:05:45 +0000 (18:05 -0500)
I forgot the new voicemail_extension wasn't a stringfield and didn't check
for NULL where I should have.

Change-Id: I029482d5c2ab72474838750461bd46b0809c90fb

res/res_pjsip_mwi.c

index a954c9c66bb912960a9444f22f04aa32f1c2f0e5..f9bfc1904d9bd1d982b686816e42e4617f5f6340 100644 (file)
@@ -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;
                }