Skip to content

Graceful handling for invalid target function #16

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

m417z
Copy link

@m417z m417z commented Apr 5, 2025

Fixes #14.

Note that this fix is not 100% complete. For example, the x64 command FF 01 is valid, but FF FF isn't. Still, both are reported as 2-byte commands.

I'm not an assembly guru, but this comment:

Makes me think that perhaps a check like if (b1 & 0x80) return NULL; (edit: probably if ((b1 & 0x38) == 0x38) return NULL;) will cover this case and similar cases where this comment is found.

I don't know if other adjustments are required, and I didn't want to make changes in these sensitive areas which I don't fully understand.

@RatinCN
Copy link
Member

RatinCN commented Apr 6, 2025

Me too, I may need some time to confirm.

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.

Graceful handling for invalid target function
2 participants