summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com>2020-11-03 15:01:56 (GMT)
committerGitHub <noreply@github.com>2020-11-03 15:01:56 (GMT)
commitac70175fc038e0f06034c4d61c577ef4b923464a (patch)
tree18e515aac6fc967692206b3857bf815790af1a23
parent547d2bcc55e348043b2f338027c1acd9549ada76 (diff)
downloadcpython-ac70175fc038e0f06034c4d61c577ef4b923464a.zip
cpython-ac70175fc038e0f06034c4d61c577ef4b923464a.tar.gz
cpython-ac70175fc038e0f06034c4d61c577ef4b923464a.tar.bz2
bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121)
(cherry picked from commit 212d32f45c91849c17a82750df1ac498d63976be) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
-rw-r--r--Lib/plistlib.py2
-rw-r--r--Misc/NEWS.d/next/Library/2020-11-03-09-22-56.bpo-42249.vfNO2u.rst1
2 files changed, 2 insertions, 1 deletions
diff --git a/Lib/plistlib.py b/Lib/plistlib.py
index 23f7b67..3f8263b 100644
--- a/Lib/plistlib.py
+++ b/Lib/plistlib.py
@@ -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
index 0000000..071a0fd
--- /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.