Skip to content
Snippets Groups Projects
Commit 16773c3d authored by Kevin P. Fleming's avatar Kevin P. Fleming
Browse files

ensure variable structure is initialized before use (issue #5092)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 421ceff1
No related branches found
No related tags found
No related merge requests found
......@@ -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';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment