Task #52883 - python-lxml-5.3.0-3.fc42/scan-results.err
back to task #52883download
Error: CPPCHECK_WARNING (CWE-476):
lxml-5.3.0/src/lxml/sax.c:16004: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: base_vtables
#16002| }
#16003| base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1));
#16004|-> base_vtables[0] = unknown;
#16005| for (i = 1; i < PyTuple_GET_SIZE(bases); i++) {
#16006| void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i)));
Error: GCC_ANALYZER_WARNING (CWE-476):
lxml-5.3.0/src/lxml/sax.c:16004:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘base_vtables’
lxml-5.3.0/src/lxml/sax.c:16003:29: acquire_memory: this call could return NULL
lxml-5.3.0/src/lxml/sax.c:16004:5: danger: ‘base_vtables’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#16002| }
#16003| base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1));
#16004|-> base_vtables[0] = unknown;
#16005| for (i = 1; i < PyTuple_GET_SIZE(bases); i++) {
#16006| void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i)));