]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 3 Nov 2020 14:15:56 +0000 (16:15 +0200)
committerGitHub <noreply@github.com>
Tue, 3 Nov 2020 14:15:56 +0000 (16:15 +0200)
Lib/plistlib.py
Misc/NEWS.d/next/Library/2020-11-03-09-22-56.bpo-42249.vfNO2u.rst [new file with mode: 0644]

index 83b214e9dc49bfbfc854f3be6313351f0e4c9ace..2eeebe4c9a4244bc30dd411fa6f428afd37cc5e7 100644 (file)
@@ -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 (file)
index 0000000..071a0fd
--- /dev/null
@@ -0,0 +1 @@
+Fixed writing binary Plist files larger than 4 GiB.