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

Should mach_o package use bytes strings? #44

Open
YngveNPettersen opened this issue May 23, 2023 · 0 comments
Open

Should mach_o package use bytes strings? #44

YngveNPettersen opened this issue May 23, 2023 · 0 comments

Comments

@YngveNPettersen
Copy link

I have just been debugging a third party script using macholib for decoding a Mac executable being read with "rb" mode, which did not work when running in Python 3.

Once the bugs in the script itself had been fixed I hit another snag where a bytes.startswith(mach_o.SEG_TEXT) operation failed with an error due to SEG_TEXT being an str string, not a bytes string.

SEG_TEXT = "__TEXT"

My guess is that this also applies to many, if not all, the strings in the file, and possibly others in the lib

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

No branches or pull requests

1 participant