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

Yhg1s webhook-mailer at python.org
Fri Aug 11 05:59:49 EDT 2023


https://github.com/python/cpython/commit/585b4cc3bd57480f8bd04ddbc6f098e55d311582
commit: 585b4cc3bd57480f8bd04ddbc6f098e55d311582
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Yhg1s <thomas at python.org>
date: 2023-08-11T11:59:45+02:00
summary:

[3.12] Fix the long64 reader in umarshal.py (GH-107828) (#107849)

Fix the long64 reader in umarshal.py (GH-107828)
(cherry picked from commit 50bbc56009ae7303d2482f28eb62f2603664b58f)

Co-authored-by: Martin DeMello <martindemello at gmail.com>

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