From e84700a607208b7eeeee1efd2b720a978c45398a Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Sun, 31 Aug 2025 16:52:35 -0400 Subject: [PATCH] Added a NULL check at one point in the SPICE read routine that prevents a segfault under some condition (not fully investigated) involving .include files. Appears to resolve the problem without any unintended consequences. --- VERSION | 2 +- base/spice.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 6b03f2a..940751d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.298 +1.5.299 diff --git a/base/spice.c b/base/spice.c index ff09d24..1b7a91c 100644 --- a/base/spice.c +++ b/base/spice.c @@ -532,6 +532,7 @@ void ReadSpiceFile(char *fname, int filenum, struct cellstack **CellStackPtr, SkipTok(NULL); /* get the next token */ if ((EndParseFile()) && (nexttok == NULL)) break; + if (nexttok == NULL) break; if (nexttok[0] == '*') SkipNewLine(NULL);