]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 314778 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Fri, 22 Apr 2011 14:02:23 +0000 (14:02 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 22 Apr 2011 14:02:23 +0000 (14:02 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r314778 | russell | 2011-04-22 08:58:03 -0500 (Fri, 22 Apr 2011) | 11 lines

  Initialize buffers in getvar and getvarfull.

  Initialize the buffers used to hold the result from GET VARIABLE or
  GET VARIABLE FULL.  The bug report shows func_read returning garbage in
  the result.  It assumed that the buffer passed in was initialized, like many
  other functions do.  In the more common code path (through the dialplan), it
  is initialized, so just initialize it here too.

  (closes issue #19050)
  Reported by: johnz
........

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

res/res_agi.c

index 3b6dac68d7584b5a69a368f45699663277a3781c..de76d26d1c25a27b4dbae3edc92bcc20c5f8ceed 100644 (file)
@@ -2557,7 +2557,7 @@ static int handle_setvariable(struct ast_channel *chan, AGI *agi, int argc, cons
 static int handle_getvariable(struct ast_channel *chan, AGI *agi, int argc, const char * const argv[])
 {
        char *ret;
-       char tempstr[1024];
+       char tempstr[1024] = "";
 
        if (argc != 3)
                return RESULT_SHOWUSAGE;