Skip to content

Add missing m_rspConnector null checks in WriteMemory and TTD call query#1077

Merged
xusheng6 merged 1 commit into
devfrom
fix-rspconnector-writememory-ttd-null-checks
May 14, 2026
Merged

Add missing m_rspConnector null checks in WriteMemory and TTD call query#1077
xusheng6 merged 1 commit into
devfrom
fix-rspconnector-writememory-ttd-null-checks

Conversation

@xusheng6
Copy link
Copy Markdown
Member

Summary

Sites fixed:

  • GdbAdapter::WriteMemory (gdbadapter.cpp:726)
  • EsrevenAdapter::WriteMemory (esrevenadapter.cpp:1130)
  • EsrevenAdapter::GetTTDCallsForSymbols (esrevenadapter.cpp:2919)

Context

No Sentry crashes filed for these specific methods yet, but the pre-conditions for hitting them are the same as the BINARYNINJA-3X and BINARYNINJA-61 reports, so these are latent versions of the same bug.

Relationship to other PRs

PR #1075 (the structural shared_ptr lifetime fix) subsumes these as a side effect, but this PR lands the narrow guards on dev immediately without waiting on the larger review. If #1075 merges first, this is redundant and can be closed.

Test plan

  • Build the debugger; select the Gdb adapter without connecting and exercise a memory write via API — confirm no crash.
  • Same for the Esreven adapter (memory write and a TTD calls query).

🤖 Generated with Claude Code

Three publicly-callable adapter methods unconditionally dereferenced
m_rspConnector while every sibling method in the same class already
guarded the access:

- GdbAdapter::WriteMemory
- EsrevenAdapter::WriteMemory
- EsrevenAdapter::GetTTDCallsForSymbols

These are the same shape as the crashes in #1066 and #1071 — a user
selects the adapter from the UI without connecting to a backend, then
triggers a write or a TTD query, and we deref null. Mirror the existing
guard so the methods return an empty result instead.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@xusheng6 xusheng6 merged commit bd0767c into dev May 14, 2026
1 check passed
@xusheng6 xusheng6 deleted the fix-rspconnector-writememory-ttd-null-checks branch May 14, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant