]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
closes bpo-37446: resolve undefined behavior in Python/hamt.c (GH-17727)
authorBatuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
Tue, 31 Dec 2019 02:31:52 +0000 (05:31 +0300)
committerBenjamin Peterson <benjamin@python.org>
Tue, 31 Dec 2019 02:31:52 +0000 (18:31 -0800)
Python/hamt.c

index ea659c800fc460d33647ebdc2255c421dc0a76a5..f5586eec5b076a40edac234f20800894e0039156 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;