Browse Source

bpo-32436: Fix potential NULL dereference (#5286)

pull/5287/merge
Yury Selivanov 8 years ago
committed by GitHub
parent
commit
0bad4d63c6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      Python/hamt.c

4
Python/hamt.c

@ -1055,6 +1055,10 @@ hamt_node_bitmap_without(PyHamtNode_Bitmap *self,
#endif
PyHamtNode_Bitmap *clone = hamt_node_bitmap_clone(self);
if (clone == NULL) {
return W_ERROR;
}
Py_SETREF(clone->b_array[val_idx],
(PyObject *)sub_node); /* borrow */

Loading…
Cancel
Save