]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
closes bpo-37446: resolve undefined behavior in Python/hamt.c (GH-17727)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 31 Dec 2019 02:51:18 +0000 (18:51 -0800)
committerGitHub <noreply@github.com>
Tue, 31 Dec 2019 02:51:18 +0000 (18:51 -0800)
(cherry picked from commit d0c92e81aa2171228a23cb2bed36f7dab975257d)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
Python/hamt.c

index 38412596a37b024f76aeba044ff2f9afaade6af6..5efc8d7fabe8e33322b7179892967b1b8190a11b 100644 (file)
@@ -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;