]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
ast_callerid_parse() had a path that left name uninitialized.
authorRichard Mudgett <rmudgett@digium.com>
Thu, 20 May 2010 23:23:21 +0000 (23:23 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 20 May 2010 23:23:21 +0000 (23:23 +0000)
Several callers of ast_callerid_parse() do not initialize the name
parameter before calling thus there is the potential to use an
uninitialized pointer.

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

main/callerid.c

index edc00a5e5793f57a10e560cbd07618736f8c8dfd..e08d96b4c6082fdece1a990dff3a95145cf494b1 100644 (file)
@@ -985,6 +985,8 @@ int ast_callerid_parse(char *instr, char **name, char **location)
                                *ns = '\0';
                                *name = ns + 1;
                                ast_trim_blanks(*name);
+                       } else {
+                               *name = NULL;
                        }
                } else { /* no quotes, trim off leading and trailing spaces */
                        *name = ast_skip_blanks(instr);