diff options
| author | Brandon Miller <brandon@vector35.com> | 2026-06-01 14:16:02 -0400 |
|---|---|---|
| committer | Brandon Miller <brandon@vector35.com> | 2026-06-02 16:31:18 -0400 |
| commit | 75c344dcea30b1beb5680e46a7557c26fd7286e4 (patch) | |
| tree | 0d951476e562250e32569b90e008975d46faaf9e | |
| parent | 5fe1980a95f956c1f58974de27fbbfbfac1258af (diff) | |
Fix unbounded recursion in function inlining
Fix crash that occurs when two functions that directly call each other
are both marked "inline during analysis"
| -rw-r--r-- | architecture.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/architecture.cpp b/architecture.cpp index 8bb60129..0f3649cf 100644 --- a/architecture.cpp +++ b/architecture.cpp @@ -622,7 +622,12 @@ Ref<LowLevelILFunction> FunctionLifterContext::GetForeignFunctionLiftedIL(Ref<Fu size_t inlinedCallsCount = m_inlinedCalls.size(); uint64_t* inlinedCalls = nullptr; if (inlinedCallsCount) + { inlinedCalls = new uint64_t[inlinedCallsCount]; + size_t i = 0; + for (uint64_t addr : m_inlinedCalls) + inlinedCalls[i++] = addr; + } BNLowLevelILFunction* il = BNGetForeignFunctionLiftedIL(func->GetObject(), m_logger->GetObject(), inlinedCallsCount, inlinedCalls); |
