-
Notifications
You must be signed in to change notification settings - Fork 115
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
bdshemu: Fix edge case with unsupported instrs #107
bdshemu: Fix edge case with unsupported instrs #107
Conversation
34fe53e
to
bba90c7
Compare
0bfbfd3
to
66b983c
Compare
This was intended from the beginning (i.e., cycle the emulator for these instructions), but this may also be problematic, because when we reach the maximum number of instruction, we would exit with |
Yeah, I was calling |
66b983c
to
824cee7
Compare
So in conclusion, the change looks fine, and we can simply return |
824cee7
to
d637248
Compare
I have checked and regenerated the tests, should be good to merge now :) |
The change will be part of a future v2.2.1 release, as the v2.2.0 was already drafted. Thanks again for the PR! |
Fixes #106
Adjusted this PR to be more consistent with the code style.
Note:
InstructionsCount
is incremented before stop on exploit is checked. If shellcode is detected aftern
instructions,InstructionsCount
will ben+1
, even though instructionn+1
was never emulated.Context->InstructionsCount++
could be done after the stop on exploit check in order to be more accurate, but this is nitpicking.