]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Fix the long64 reader in umarshal.py (GH-107828) (#107849)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 11 Aug 2023 09:59:45 +0000 (02:59 -0700)
committerGitHub <noreply@github.com>
Fri, 11 Aug 2023 09:59:45 +0000 (11:59 +0200)
Fix the long64 reader in umarshal.py (GH-107828)
(cherry picked from commit 50bbc56009ae7303d2482f28eb62f2603664b58f)

Co-authored-by: Martin DeMello <martindemello@gmail.com>
Tools/build/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