From 4bb1dde12c94be8438b6289de3ed6e7cbff3e831 Mon Sep 17 00:00:00 2001 From: dragonmacher <48328597+dragonmacher@users.noreply.github.com> Date: Thu, 16 Sep 2021 19:57:00 -0400 Subject: [PATCH] GP-1302 - Function Call Graph - fixed stack trace due to improper action enablement Closes #3327 --- .../src/main/java/functioncalls/plugin/FcgProvider.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Ghidra/Features/GraphFunctionCalls/src/main/java/functioncalls/plugin/FcgProvider.java b/Ghidra/Features/GraphFunctionCalls/src/main/java/functioncalls/plugin/FcgProvider.java index 02516013f8..13b23b6bcb 100644 --- a/Ghidra/Features/GraphFunctionCalls/src/main/java/functioncalls/plugin/FcgProvider.java +++ b/Ghidra/Features/GraphFunctionCalls/src/main/java/functioncalls/plugin/FcgProvider.java @@ -1250,7 +1250,12 @@ public class FcgProvider @Override boolean isExpandable(FcgVertex vertex) { Iterable vertices = getVerticesByLevel(vertex.getLevel()); - return CollectionUtils.asStream(vertices).anyMatch(v -> v.canExpand()); + if (direction == IN) { + return CollectionUtils.asStream(vertices) + .anyMatch(FcgVertex::canExpandIncomingReferences); + } + return CollectionUtils.asStream(vertices) + .anyMatch(FcgVertex::canExpandOutgoingReferences); } } }