Prevent crash if *line == NULL
This commit is contained in:
parent
53b72a7693
commit
a28784d6d7
|
|
@ -31,6 +31,11 @@ INPgetTok(char **line, char **token, int gobble)
|
|||
char *point;
|
||||
int signstate;
|
||||
|
||||
if (!*line) {
|
||||
*token = NULL;
|
||||
return (E_PARMVAL);
|
||||
}
|
||||
|
||||
/* scan along throwing away garbage characters until end of line
|
||||
or a separation char is found */
|
||||
for (point = *line; *point != '\0'; point++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue