[Python-checkins] Fix the long64 reader in umarshal.py (GH-107828)

serhiy-storchaka webhook-mailer at python.org
Thu Aug 10 16:43:17 EDT 2023


https://github.com/python/cpython/commit/50bbc56009ae7303d2482f28eb62f2603664b58f
commit: 50bbc56009ae7303d2482f28eb62f2603664b58f
branch: main
author: Martin DeMello <martindemello at gmail.com>
committer: serhiy-storchaka <storchaka at gmail.com>
date: 2023-08-10T23:43:14+03:00
summary:

Fix the long64 reader in umarshal.py (GH-107828)

files:
M Tools/build/umarshal.py

diff --git a/Tools/build/umarshal.py b/Tools/build/umarshal.py
index f61570cbaff75..e05d93cf23c92 100644
--- a/Tools/build/umarshal.py
+++ b/Tools/build/umarshal.py
@@ -125,10 +125,10 @@ def r_long64(self) -> int:
         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
 



More information about the Python-checkins mailing list