[Python-checkins] closes bpo-37446: resolve undefined behavior in Python/hamt.c (GH-17727)

Benjamin Peterson webhook-mailer at python.org
Mon Dec 30 21:31:59 EST 2019


https://github.com/python/cpython/commit/d0c92e81aa2171228a23cb2bed36f7dab975257d
commit: d0c92e81aa2171228a23cb2bed36f7dab975257d
branch: master
author: Batuhan Taşkaya <47358913+isidentical at users.noreply.github.com>
committer: Benjamin Peterson <benjamin at python.org>
date: 2019-12-30T18:31:52-08:00
summary:

closes bpo-37446: resolve undefined behavior in Python/hamt.c (GH-17727)

files:
M Python/hamt.c

diff --git a/Python/hamt.c b/Python/hamt.c
index ea659c800fc46..f5586eec5b076 100644
--- a/Python/hamt.c
+++ b/Python/hamt.c
@@ -1864,7 +1864,7 @@ hamt_node_array_without(PyHamtNode_Array *self,
                     continue;
                 }
 
-                bitmap |= 1 << i;
+                bitmap |= 1U << i;
 
                 if (IS_BITMAP_NODE(node)) {
                     PyHamtNode_Bitmap *child = (PyHamtNode_Bitmap *)node;



More information about the Python-checkins mailing list