]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] Fix the long64 reader in umarshal.py (GH-107828) (GH-107850)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 10 Aug 2023 21:10:46 +0000 (14:10 -0700)
committerGitHub <noreply@github.com>
Thu, 10 Aug 2023 21:10:46 +0000 (21:10 +0000)
(cherry picked from commit 50bbc56009ae7303d2482f28eb62f2603664b58f)

Co-authored-by: Martin DeMello <martindemello@gmail.com>
Tools/scripts/umarshal.py

index f61570cbaff751144c7be789774401c8d92ef3a5..e05d93cf23c921bea1157904deebefbf61e7a164 100644 (file)
@@ -125,10 +125,10 @@ class Reader:
         x |= buf[1] << 8
         x |= buf[2] << 16
         x |= buf[3] << 24
-        x |= buf[1] << 32
-        x |= buf[1] << 40
-        x |= buf[1] << 48
-        x |= buf[1] << 56
+        x |= buf[4] << 32
+        x |= buf[5] << 40
+        x |= buf[6] << 48
+        x |= buf[7] << 56
         x |= -(x & (1<<63))  # Sign-extend
         return x