From c4c7aa5dad6eb651e76d86d0d1a7a5c2ad6ded61 Mon Sep 17 00:00:00 2001 From: caheckman <48068198+caheckman@users.noreply.github.com> Date: Mon, 21 Jul 2025 19:40:05 +0000 Subject: [PATCH] Fix for infinite loop caused by RulePtrsubUndo --- Ghidra/Features/Decompiler/src/decompile/cpp/type.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc index 88ca8e36c8..f00502ba65 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/type.cc @@ -1726,6 +1726,9 @@ Datatype *TypeStruct::nearestArrayedComponentForward(int8 off,int8 *newoff,int8 int8 suboff; Datatype *res = subtype->nearestArrayedComponentForward(remain, &suboff, elSize); if (res != (Datatype *)0) { + int8 subdiff = diff + remain - suboff; + if (subdiff > 128) + break; *newoff = -diff; return subtype; }