From f3cebd90995a8452fece85a9022fd48958ec86fe Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Fri, 8 Jan 2021 09:55:00 -0500 Subject: [PATCH] Corrected a potential crash condition while doing series combination. --- VERSION | 2 +- base/netgen.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 5409a56..d20953c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.161 +1.5.162 diff --git a/base/netgen.c b/base/netgen.c index f2e3830..ffb9c38 100644 --- a/base/netgen.c +++ b/base/netgen.c @@ -3584,8 +3584,8 @@ int CombineSeries(char *model, int file) /* Excise the 2nd instance. instlist[i][1] remains as the */ /* only pointer to it. */ - for (obp = instlist[i][0]; obp->next->type > FIRSTPIN || - obp->next->type == PROPERTY; obp = obp->next); + for (obp = instlist[i][0]; obp->next && (obp->next->type > FIRSTPIN || + obp->next->type == PROPERTY); obp = obp->next); for (ob2 = obp; ob2 && ob2->next != instlist[i][1]; ob2 = ob2->next); /* Device may have been moved by the above code. If so, look for */