From 1ecefb64878ab4393b2f6aca9c956222eb12e910 Mon Sep 17 00:00:00 2001 From: Zeyu Wang <zeyuwang1@student.unimelb.edu.au> Date: Wed, 21 Oct 2020 22:40:47 +1100 Subject: [PATCH] Update dc.c --- src/vuln-2/dc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vuln-2/dc.c b/src/vuln-2/dc.c index 1a47cd0..ed843fe 100644 --- a/src/vuln-2/dc.c +++ b/src/vuln-2/dc.c @@ -74,6 +74,10 @@ static node_t *node_new(const char *varname, const value_t value){ assert(new != NULL && "new: malloc failed"); new->varname = strdup(varname); assert(new->varname != NULL && "new: strdup varname failed"); + /***********/ + new->varname = (char *)malloc (1002*sizeof(char)); + strcpy(new->varname, varname); + /*********/ new->value = value; new->left = NULL; new->right = NULL; -- GitLab