mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-22 13:57:32 +02:00
BUGFIX: #797 - gettoks did not protect against NULL pointer input
This commit is contained in:
committed by
Holger Vogt
parent
a44f7ce87a
commit
178b541fb2
@@ -596,6 +596,10 @@ gettoks(char *s)
|
||||
list = NULL;
|
||||
prevp = &list;
|
||||
|
||||
if (!s) {
|
||||
return list;
|
||||
}
|
||||
|
||||
/* stripWhite.... uses copy() to return a malloc'ed s, so we have to free it,
|
||||
using s0 as its starting address */
|
||||
if (strchr(s, '('))
|
||||
|
||||
Reference in New Issue
Block a user