Prevent crash if *line == NULL

This commit is contained in:
Holger Vogt 2023-06-13 20:05:49 +02:00
parent 53b72a7693
commit a28784d6d7
1 changed files with 5 additions and 0 deletions

View File

@ -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++) {