New submission from John Lehr: libplist raises an invalid file exception on loading properly formed binary plists containing UID (0x80) values. The binary files were tested for form with plutil.
Comments at line 706 state the value is defined but not in use in plists, and the object is not handled. However, I find them frequently in bplists, e.g., iOS Snapchat application files. I have attached a proposed patch that I have tested on these files and can now successfully parse them with the _read_object method in the _BinaryPlistParser class. My proposed patch is pasted below for others consideration while waiting for the issue to be resolved. 706,707c706,708 < # tokenH == 0x80 is documented as 'UID' and appears to be used for < # keyed-archiving, not in plists. --- > elif tokenH == 0x80: #UID > s = self._get_size(tokenL) > return self._fp.read(s).decode('ascii') Thanks for your consideration. ---------- components: Library (Lib) files: plistlib_uid.diff keywords: patch messages: 262974 nosy: slo.sleuth priority: normal severity: normal status: open title: plistlib fails to parse bplist with 0x80 UID values type: crash versions: Python 3.5 Added file: http://bugs.python.org/file42388/plistlib_uid.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26707> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com