Skip to content
Snippets Groups Projects
Commit 3cf58d70 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

fix buffer overflow

parent cfcdec29
No related branches found
No related tags found
No related merge requests found
...@@ -75,13 +75,12 @@ static void list2binbuf(t_binbuf**bbuf, int *n, char**str, int argc, ...@@ -75,13 +75,12 @@ static void list2binbuf(t_binbuf**bbuf, int *n, char**str, int argc,
binbuf_clear(*bbuf); binbuf_clear(*bbuf);
binbuf_add(*bbuf, argc, argv); binbuf_add(*bbuf, argc, argv);
binbuf_gettext(*bbuf, str, n); binbuf_gettext(*bbuf, str, &i);
i=*n;
s=*str;
if(s && ' '==s[i]) { s = t_resizebytes(*str, i, i+1);
s[i]=0; s[i] = 0;
} *str = s;
*n = i+1;
} }
static void strcmp_list(t_strcmp *x, t_symbol* UNUSED(s), int argc, static void strcmp_list(t_strcmp *x, t_symbol* UNUSED(s), int argc,
......
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