]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix the long64 reader in umarshal.py (GH-107828)
authorMartin DeMello <martindemello@gmail.com>
Thu, 10 Aug 2023 20:43:14 +0000 (13:43 -0700)
committerGitHub <noreply@github.com>
Thu, 10 Aug 2023 20:43:14 +0000 (23:43 +0300)
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