gh-111803: Support loading more deeply nested lists in binary plist format (GH-114024)

It no longer uses the C stack. The depth of nesting is only limited by
Python recursion limit setting.
This commit is contained in:
Serhiy Storchaka 2024-01-13 15:26:55 +02:00 committed by GitHub
parent dd56b57483
commit 77b45fa6d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -600,7 +600,8 @@ class _BinaryPlistParser:
obj_refs = self._read_refs(s) obj_refs = self._read_refs(s)
result = [] result = []
self._objects[ref] = result self._objects[ref] = result
result.extend(self._read_object(x) for x in obj_refs) for x in obj_refs:
result.append(self._read_object(x))
# tokenH == 0xB0 is documented as 'ordset', but is not actually # tokenH == 0xB0 is documented as 'ordset', but is not actually
# implemented in the Apple reference code. # implemented in the Apple reference code.

View File

@ -0,0 +1,2 @@
:mod:`plistlib` now supports loading more deeply nested lists in binary
format.