From 349ffd091f58690098d19951558bbae5bb89b576 Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Fri, 29 May 2026 14:06:50 -0400 Subject: [PATCH] Corrected an error when merging nodes during "ext2spice". The code was checking for device terminals that were pointing to the deallocated node and updating them. However, it failed to check for whether or not the substrate terminal was pointing to the deallocated node, potentially causing a crash condition. That has now been fixed. --- extflat/EFbuild.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extflat/EFbuild.c b/extflat/EFbuild.c index beb2168a..3f58267d 100644 --- a/extflat/EFbuild.c +++ b/extflat/EFbuild.c @@ -706,6 +706,11 @@ efBuildEquiv(def, nodeName1, nodeName2, resist, isspice) dev->dev_terms[n].dterm_node = (nn1->efnn_node == NULL) ? nn2->efnn_node : nn1->efnn_node; + + /* Also check the substrate terminal */ + if (dev->dev_subsnode == lostnode) + dev->dev_subsnode = (nn1->efnn_node == NULL) ? + nn2->efnn_node : nn1->efnn_node; } /* If a node has been merged away, make sure that its name */