Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix heap corruption in Rust bindings #62

Merged
merged 1 commit into from
May 22, 2024

Conversation

encounter
Copy link
Contributor

RabbitizerInstruction_getSizeForBuffer and RabbitizerOperandType_getBufferSize return the size without the null terminator, so we need to allocate one more byte to avoid writing past the allocated vector bounds.

This matches the behavior of the C code in the various places these functions are used.

RabbitizerInstruction_getSizeForBuffer and
RabbitizerOperandType_getBufferSize return
the size _without_ the null terminator, so
we need to allocate one more byte to avoid
writing past the allocated vector bounds.
@AngheloAlf AngheloAlf merged commit 4dd2a55 into Decompollaborate:develop May 22, 2024
17 checks passed
@AngheloAlf AngheloAlf mentioned this pull request May 22, 2024
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.

2 participants