summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2011-04-22 14:08:02 +0000
committerRussell Bryant <russell@russellbryant.com>2011-04-22 14:08:02 +0000
commit4881d654818f8c1882a58f554ec5dd7e97204194 (patch)
tree3cce2cf8a04d5e2a0df5c03bf0c9257f22f2c840
parent0f1ff9141e22d0bfd46126cb4b22bc7de5cce3ae (diff)
Merged revisions 314780 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r314780 | russell | 2011-04-22 09:02:23 -0500 (Fri, 22 Apr 2011) | 18 lines Merged revisions 314778 via svnmerge from 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/trunk@314781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--res/res_agi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index 1fe8a2ae1..1683cb3a1 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -2558,7 +2558,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;