]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If either conditional is NULL, don't try copying it.
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 13 Jan 2009 17:48:00 +0000 (17:48 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 13 Jan 2009 17:48:00 +0000 (17:48 +0000)
(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

funcs/func_logic.c

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