From: Jonathan Rose Date: Fri, 11 Nov 2011 15:21:50 +0000 (+0000) Subject: Fix a segmentation fault when using an extension with CID matching and no CID. X-Git-Tag: 1.8.9.0-rc1~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55e8d5b38077bfca7b6db5ec7d024a905ffbe08a;p=thirdparty%2Fasterisk.git Fix a segmentation fault when using an extension with CID matching and no CID. Attempting to call an extension which used Caller ID matching with a channel that has an empty caller id string would result in a segmentation fault. (closes issue ASTERISK-18392 Reported By: Ales Zelenik git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@344608 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/pbx.c b/main/pbx.c index bd3e7a999e..b27ab3374f 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -2493,7 +2493,7 @@ static int extension_match_core(const char *pattern, const char *data, enum ext_ prof_id = ast_add_profile("ext_match", 0); } ast_mark(prof_id, 1); - i = _extension_match_core(pattern, data, mode); + i = _extension_match_core(ast_strlen_zero(pattern) ? "" : pattern, ast_strlen_zero(data) ? "" : data, mode); ast_mark(prof_id, 0); return i; }