Skip to content

Commit

Permalink
Corrected a rare case where a NULL value propagates in the flattening
Browse files Browse the repository at this point in the history
routine and is not caught until it causes a segfault.
  • Loading branch information
RTimothyEdwards committed Aug 16, 2024
1 parent bf4112d commit 2b88d79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.276
1.5.277
6 changes: 4 additions & 2 deletions base/flatten.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 2b88d79

Please sign in to comment.