From: Miss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 3 Nov 2020 21:32:59 +0000 (-0800) Subject: bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121) X-Git-Tag: v3.9.1rc1~68 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9bc07874e34930d4e816a9a3330aab009404991e;p=thirdparty%2FPython%2Fcpython.git bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121) (cherry picked from commit 212d32f45c91849c17a82750df1ac498d63976be) Co-authored-by: Serhiy Storchaka --- diff --git a/Lib/plistlib.py b/Lib/plistlib.py index 83b214e9dc49..2eeebe4c9a42 100644 --- a/Lib/plistlib.py +++ b/Lib/plistlib.py @@ -611,7 +611,7 @@ def _count_to_size(count): elif count < 1 << 16: return 2 - elif count << 1 << 32: + elif count < 1 << 32: return 4 else: diff --git a/Misc/NEWS.d/next/Library/2020-11-03-09-22-56.bpo-42249.vfNO2u.rst b/Misc/NEWS.d/next/Library/2020-11-03-09-22-56.bpo-42249.vfNO2u.rst new file mode 100644 index 000000000000..071a0fdda1ff --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-11-03-09-22-56.bpo-42249.vfNO2u.rst @@ -0,0 +1 @@ +Fixed writing binary Plist files larger than 4 GiB.