ensure variable structure is initialized before use (issue #5092)
authorKevin P. Fleming <kpfleming@digium.com>
Thu, 1 Sep 2005 22:08:58 +0000 (22:08 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Thu, 1 Sep 2005 22:08:58 +0000 (22:08 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6494 65c4cc65-6c06-0410-ace0-fbb531ad65f3

chanvars.c

index 7cd32cc..14ad615 100755 (executable)
@@ -40,6 +40,7 @@ struct ast_var_t *ast_var_assign(const char *name, const char *value)
                return NULL;
        }
        
+       memset(var, 0, len);
        i = strlen(name);
        strncpy(var->name, name, i); 
        var->name[i] = '\0';