You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
elf_assert(magic==b'\x7fELF', 'Magic number does not match')
When this code is used with a shared file pointer and code that assumes the file pointer will be 0 a code path like when trying to create an ELFFile object, it can cause issues when the ending file pointer is not 0. On an exception, the file pointer should be reset to 0 and the exception reraised.
The text was updated successfully, but these errors were encountered:
There is a case where the _identify function in elffile.py raises an exception, leaving the file pointer at 4.
pyelftools/elftools/elf/elffile.py
Lines 567 to 569 in 8a74c8f
When this code is used with a shared file pointer and code that assumes the file pointer will be 0 a code path like when trying to create an ELFFile object, it can cause issues when the ending file pointer is not 0. On an exception, the file pointer should be reset to 0 and the exception reraised.
The text was updated successfully, but these errors were encountered: