numparam/spicenum.c, prevent memory access beyond end of string

This commit is contained in:
rlar 2016-03-21 15:11:50 +01:00
parent 1578348fdf
commit 88983b079b
1 changed files with 1 additions and 1 deletions

View File

@ -831,7 +831,7 @@ nupa_eval(char *s, int linenum, int orig_linenum)
} else if (c == 'X') {
/* compute args of subcircuit, if required */
ptr = s;
while (!isspace_c(*ptr))
while (*ptr && !isspace_c(*ptr))
ptr++;
keep = *ptr;
*ptr = '\0';