Open LubosD opened 6 years ago
@LubosD thanks for the info, I'll take a look.
Adding to this issue -- I'm experiencing a similar (the same?) error when using the package.
Traceback (most recent call last):
File "[redacted]", line 237, in [redacted]
[redacted]
File "[redacted]", line 26, in [redacted]
macho_dictionary = macholibre.parse(f.name)
File "/usr/local/lib/python3.6/dist-packages/macholibre/__init__.py", line 45, in parse
return parser.parse()
File "/usr/local/lib/python3.6/dist-packages/macholibre/parser.py", line 1680, in parse
self.parse_file()
File "/usr/local/lib/python3.6/dist-packages/macholibre/parser.py", line 1671, in parse_file
self.parse_macho(0, self.__output['size'])
File "/usr/local/lib/python3.6/dist-packages/macholibre/parser.py", line 1588, in parse_macho
self.parse_lcs(offset, size, nlcs, slcs)
File "/usr/local/lib/python3.6/dist-packages/macholibre/parser.py", line 791, in parse_lcs
self.parse_segment(offset, size, cmd, cmd_size))
File "/usr/local/lib/python3.6/dist-packages/macholibre/parser.py", line 230, in parse_segment
name = self.__file.read(16).decode().rstrip('\u0000')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x99 in position 14: invalid start byte
@jshlbrd , do you have a hash I can use to test?
@aaronst yep, try this one: be55e8952a262d0e524239dbf82191ed
@aaronst I attempted a fix on python2 branch here: https://github.com/aaronst/macholibre/pull/28
This happens to me when I try to parse a core dump Mach-O file: