Add missing m_rspConnector null checks in WriteMemory and TTD call query#1077
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
m_rspConnectorwhile every sibling method in the same class already null-checks it. Mirror the existing guard so they return an empty result instead of crashing.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
devimmediately without waiting on the larger review. If #1075 merges first, this is redundant and can be closed.Test plan
🤖 Generated with Claude Code