From bbe645f0ab0af0f4a3b9ab3eaad414a2ca8eb0ed Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Tue, 25 Mar 2025 17:00:58 -0400 Subject: [PATCH] Corrected an error in which netgen was trying to reduce an expression in a property that was not necessarily a parameter, and if it wasn't, then netgen would crash. Surfaced by an example using complicated parameters that netgen was apparently unable to handle (an issue for another day; the main goal here was to avoid a segmentation violation). --- VERSION | 2 +- base/netgen.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index d8d0e78..e5777e5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.293 +1.5.294 diff --git a/base/netgen.c b/base/netgen.c index 32b0177..844da03 100644 --- a/base/netgen.c +++ b/base/netgen.c @@ -2248,7 +2248,10 @@ int PromoteProperty(struct property *prop, struct valuelist *vl, if (prop == NULL || vl == NULL) return -1; if (prop->type == vl->type) return 1; /* Nothing to do */ result = 0; - if (prop->type == PROP_EXPRESSION) { + /* If vl is an expression but prop is not, then try to reduce + * the expression in vl. + */ + if (vl->type == PROP_EXPRESSION) { ReduceOneExpression(vl, ob, tc, FALSE); } switch (prop->type) {