Fix corruptin in app_cut (bug #1084)
[asterisk/asterisk.git] / apps / app_cut.c
index 1d3cf5b..18de2d1 100755 (executable)
@@ -85,6 +85,8 @@ static int cut_exec(struct ast_channel *chan, void *data)
                char *tmp2 = alloca(MAXRESULT);
                char retstring[MAXRESULT];
 
                char *tmp2 = alloca(MAXRESULT);
                char retstring[MAXRESULT];
 
+               if (tmp2)
+                       memset(tmp2, 0, MAXRESULT);
                memset(retstring, 0, MAXRESULT);
 
                if (tmp && tmp2) {
                memset(retstring, 0, MAXRESULT);
 
                if (tmp && tmp2) {