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

add a new ELF program header:PT_GNU_PROPERTY #35

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

Conversation

EarthCompass
Copy link

ELFs containing this program header will cause patchkit to crash.

Traceback (most recent call last):
  File "./patch", line 34, in <module>
    patch = Patcher(binary, verbose=options.verbose, cflags=options.cflags)
  File "/****/patchkit/core/patcher.py", line 11, in __init__
    self.bin = Binary(binary)
  File "/****/patchkit/core/binary.py", line 29, in __init__
    if ph.isload:
  File "/****/patchkit/util/elffile.py", line 1435, in isload
    return PT[self.type].name == 'PT_LOAD'
  File "/****/patchkit/util/elffile.py", line 66, in __getitem__
    return self.bycode[key]
KeyError: 1685382483

So I did a simple fix. ; )

@hacrot3000
Copy link

Thanks @EarthCompass, it works well.

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