Skip to content

Commit 0bad4d6

Browse files
authored
bpo-32436: Fix potential NULL dereference (#5286)
1 parent 9d411c1 commit 0bad4d6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Python/hamt.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,10 @@ hamt_node_bitmap_without(PyHamtNode_Bitmap *self,
10551055
#endif
10561056

10571057
PyHamtNode_Bitmap *clone = hamt_node_bitmap_clone(self);
1058+
if (clone == NULL) {
1059+
return W_ERROR;
1060+
}
1061+
10581062
Py_SETREF(clone->b_array[val_idx],
10591063
(PyObject *)sub_node); /* borrow */
10601064

0 commit comments

Comments
 (0)