Corrected a rare case where a NULL value propagates in the flattening

routine and is not caught until it causes a segfault.
This commit is contained in:
Tim Edwards 2024-08-16 19:48:36 -04:00
parent bf4112db07
commit 2b88d79adc
2 changed files with 5 additions and 3 deletions

View File

@ -1 +1 @@
1.5.276
1.5.277

View File

@ -600,8 +600,10 @@ int flattenInstancesOf(char *name, int fnum, char *instance)
else break;
/* Put the child cell at the start of ChildObjList */
ChildEnd->next = ChildObjList;
ChildObjList = ChildStart;
if (ChildEnd) {
ChildEnd->next = ChildObjList;
ChildObjList = ChildStart;
}
}
/* Put the child cell at the start of ChildObjList */