Merged revisions 50266 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Wed, 10 Jan 2007 03:53:30 +0000 (03:53 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 10 Jan 2007 03:53:30 +0000 (03:53 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r50266 | file | 2007-01-09 22:51:29 -0500 (Tue, 09 Jan 2007) | 2 lines

Ensure data's existence before trying to access it. (issue #8774 reported by rcourtna)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@50267 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/pbx.c

index 151a791..198f3b3 100644 (file)
@@ -1631,7 +1631,7 @@ static void pbx_substitute_variables(char *passdata, int datalen, struct ast_cha
        memset(passdata, 0, datalen);
 
        /* No variables or expressions in e->data, so why scan it? */
-       if (!strchr(e->data, '$') && !strstr(e->data,"${") && !strstr(e->data,"$[") && !strstr(e->data,"$(")) {
+       if (e->data && !strchr(e->data, '$') && !strstr(e->data,"${") && !strstr(e->data,"$[") && !strstr(e->data,"$(")) {
                ast_copy_string(passdata, e->data, datalen);
                return;
        }