From: Tilghman Lesher Date: Tue, 13 Jan 2009 17:48:00 +0000 (+0000) Subject: If either conditional is NULL, don't try copying it. X-Git-Tag: 1.4.23-testing~2^2~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ebe9c9c5db961321e406e66b6b7deafe49492614;p=thirdparty%2Fasterisk.git If either conditional is NULL, don't try copying it. (closes issue #14226) Reported by: caspy Patches: 20090113__bug14226.diff.txt uploaded by Corydon76 (license 14) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168546 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/funcs/func_logic.c b/funcs/func_logic.c index c5619fbfe7..ef972c9699 100644 --- a/funcs/func_logic.c +++ b/funcs/func_logic.c @@ -83,7 +83,7 @@ static int iftime(struct ast_channel *chan, char *cmd, char *data, char *buf, if (iffalse) iffalse = ast_strip_quoted(iffalse, "\"", "\""); - ast_copy_string(buf, ast_check_timing(&timing) ? iftrue : iffalse, len); + ast_copy_string(buf, ast_check_timing(&timing) ? S_OR(iftrue, "") : S_OR(iffalse, ""), len); return 0; }