From 8d994bed55d1bd742e43fd5cf8fef6858e557450 Mon Sep 17 00:00:00 2001 From: Jonathan Rose <jrose@digium.com> Date: Fri, 11 Nov 2011 15:47:39 +0000 Subject: [PATCH] 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 ........ Merged revisions 344608 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344609 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344610 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/pbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/pbx.c b/main/pbx.c index 973a44b9c2..275a6a7bf4 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -2614,7 +2614,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; } -- GitLab