]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121)
authorMiss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 3 Nov 2020 15:01:56 +0000 (07:01 -0800)
committerGitHub <noreply@github.com>
Tue, 3 Nov 2020 15:01:56 +0000 (07:01 -0800)
(cherry picked from commit 212d32f45c91849c17a82750df1ac498d63976be)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/plistlib.py
Misc/NEWS.d/next/Library/2020-11-03-09-22-56.bpo-42249.vfNO2u.rst [new file with mode: 0644]

index 23f7b677cd781259befe1b86660f73bb3bcd9f8a..3f8263b922e6b1a85c14fbf1ce23b470672a7f16 100644 (file)
@@ -736,7 +736,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 (file)
index 0000000..071a0fd
--- /dev/null
@@ -0,0 +1 @@
+Fixed writing binary Plist files larger than 4 GiB.