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

Add range checks for operand access (fixes #1750) #1751

Merged
merged 3 commits into from Oct 10, 2017

Conversation

Projects
None yet
2 participants
@athre0z
Contributor

athre0z commented Oct 9, 2017

The previous Capstone based code operated on the raw instruction structure operands (.getInstr().operands[0]) while the replacement code uses Zydis::operator[]. With raw access, such checks are not required, the operand type is (I'm guessing, not a Capstone expert) initialized to 0. I forgot to add range checks in the progress of the port.

athre0z added some commits Oct 9, 2017

DBG: added range checks to operand access
- previously, some instructions could trigger the `DebugBreak` path in `Zydis::operator[]`

@mrexodia mrexodia merged commit c5c3358 into x64dbg:development Oct 10, 2017

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@mrexodia

This comment has been minimized.

Show comment
Hide comment
@mrexodia

mrexodia Oct 10, 2017

Member

Thanks!

Member

mrexodia commented Oct 10, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment