New submission from STINNER Victor <victor.stin...@gmail.com>:

Coverity found a bug in hamt.c:

** CID 1428443:  Null pointer dereferences  (NULL_RETURNS)
/Python/hamt.c: 1058 in hamt_node_bitmap_without()


________________________________________________________________________________________________________
*** CID 1428443:  Null pointer dereferences  (NULL_RETURNS)
/Python/hamt.c: 1058 in hamt_node_bitmap_without()
1052                         assert(hamt_node_collision_count(
1053                                 (PyHamtNode_Collision*)sub_node) > 1);
1054                     }
1055     #endif
1056
1057                     PyHamtNode_Bitmap *clone = 
hamt_node_bitmap_clone(self);
>>>     CID 1428443:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a null pointer "clone".
1058                     Py_SETREF(clone->b_array[val_idx],
1059                               (PyObject *)sub_node);  /* borrow */
1060
1061                     *new_node = (PyHamtNode *)clone;
1062                     return W_NEWNODE;
1063                 }

----------
components: Interpreter Core
messages: 310522
nosy: vstinner, yselivanov
priority: normal
severity: normal
status: open
title: Coverity: CID 1428443:  Null pointer dereferences  (NULL_RETURNS) 
/Python/hamt.c: 1058 in hamt_node_bitmap_without()
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32639>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to