Commit ffe89512 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

vav: Bound check after moving forward

There's no longer the guarantee of a null character at the end of a VAV
string.
parent 70b7d584
......@@ -190,11 +190,11 @@ VAV_ParseTxt(const char *b, const char *e, int *argc, int flag)
}
if (*b == '"' && !(flag & ARGV_NOESC))
break;
b++;
if (b >= e) {
argv[0] = err_missing_quote;
return (argv);
}
b++;
}
if (nargv + 1 >= largv) {
argv = realloc(argv, sizeof (*argv) * (largv += largv));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment