From 4231ad3f5feb7dc062619a1b145d92aeb1c02e53 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Wed, 12 Apr 2023 13:40:05 +0200 Subject: [PATCH] Prevent reading from NULL when user input is something like .ic=v --- src/spicelib/parser/inppas3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/spicelib/parser/inppas3.c b/src/spicelib/parser/inppas3.c index d1eaf6b13..f1d97b7b8 100644 --- a/src/spicelib/parser/inppas3.c +++ b/src/spicelib/parser/inppas3.c @@ -148,6 +148,8 @@ INPpas3(CKTcircuit *ckt, struct card *data, INPtables *tab, TSKtask *task, FREE(name); /* Gobble the rest of the token */ line = nexttok(line); + if (!line) + break; continue; } ptemp.rValue = INPevaluate(&line,&error,1);