Error: SHELLCHECK_WARNING (CWE-477): [#def1] /usr/bin/xml2-config:97:44: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 95| fi # 96| # 97|-> if [ "-L${libdir}" != "-L/usr/lib" -a "-L${libdir}" != "-L/usr/lib64" ]; then # 98| libs="-L${libdir} $libs" # 99| fi Error: COMPILER_WARNING (CWE-704): [#def2] libxml2-2.13.9/HTMLparser.c: scope_hint: In function 'htmlCheckAutoClose' libxml2-2.13.9/HTMLparser.c:1395:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type # 1395 | res = bsearch(&key, htmlStartClose, # | ^ # 1393| key.oldTag = (const char *) oldtag; # 1394| key.newTag = (const char *) newtag; # 1395|-> res = bsearch(&key, htmlStartClose, # 1396| sizeof(htmlStartClose) / sizeof(htmlStartCloseEntry), # 1397| sizeof(htmlStartCloseEntry), htmlCompareStartClose); Error: COMPILER_WARNING (CWE-704): [#def3] libxml2-2.13.9/HTMLparser.c:1395:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type # 1393| key.oldTag = (const char *) oldtag; # 1394| key.newTag = (const char *) newtag; # 1395|-> res = bsearch(&key, htmlStartClose, # 1396| sizeof(htmlStartClose) / sizeof(htmlStartCloseEntry), # 1397| sizeof(htmlStartCloseEntry), htmlCompareStartClose); Error: CPPCHECK_WARNING (CWE-457): [#def4] libxml2-2.13.9/HTMLparser.c:2468: warning[uninitvar]: Uninitialized variable: loc # 2466| } # 2467| # 2468|-> ret = xmlDictLookup(ctxt->dict, loc, i); # 2469| if (ret == NULL) # 2470| htmlErrMemory(ctxt); Error: CPPCHECK_WARNING (CWE-457): [#def5] libxml2-2.13.9/HTMLparser.c:2504: warning[uninitvar]: Uninitialized variable: loc # 2502| } # 2503| # 2504|-> ret = xmlDictLookup(ctxt->dict, loc, i); # 2505| if (ret == NULL) # 2506| htmlErrMemory(ctxt); Error: CPPCHECK_WARNING (CWE-457): [#def6] libxml2-2.13.9/catalog.c:2235: warning[uninitvar]: Uninitialized variable: buf # 2233| return(NULL); # 2234| } # 2235|-> *name = xmlStrndup(buf, len); # 2236| return(cur); # 2237| } Error: GCC_ANALYZER_WARNING (CWE-835): [#def7] libxml2-2.13.9/dict.c:657:12: warning[-Wanalyzer-infinite-loop]: infinite loop # 655| */ # 656| oldentry = dict->table; # 657|-> while (oldentry->hashValue != 0) { # 658| if (++oldentry >= oldend) # 659| oldentry = dict->table; Error: GCC_ANALYZER_WARNING (CWE-476): [#def8] libxml2-2.13.9/dict.c:797:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'entry' libxml2-2.13.9/dict.c:914:1: enter_function: entry to 'xmlDictQLookup' libxml2-2.13.9/dict.c:917:13: call_function: calling 'xmlDictLookupInternal' from 'xmlDictQLookup' # 795| * Shift the remainder of the probe sequence to the right # 796| */ # 797|-> if (entry->hashValue != 0) { # 798| const xmlDictEntry *end = &dict->table[dict->size]; # 799| const xmlDictEntry *cur = entry; Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] libxml2-2.13.9/encoding.c:1513:8: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open(name, "UTF-8")' libxml2-2.13.9/encoding.c:1502:8: branch_false: following 'false' branch... libxml2-2.13.9/encoding.c:1512:15: branch_false: ...to here libxml2-2.13.9/encoding.c:1512:15: acquire_memory: allocated here libxml2-2.13.9/encoding.c:1513:8: danger: 'iconv_open(name, "UTF-8")' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2) # 1511| # 1512| icv_out = iconv_open(name, "UTF-8"); # 1513|-> if (icv_out == (iconv_t) -1) { # 1514| if (errno == EINVAL) # 1515| ret = XML_ERR_UNSUPPORTED_ENCODING; Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] libxml2-2.13.9/globals.c:867:29: warning[-Wanalyzer-malloc-leak]: leak of 'xmlGetThreadLocalStorage(0)' libxml2-2.13.9/globals.c:906:1: enter_function: entry to 'xmlGetLocalRngState' libxml2-2.13.9/globals.c:907:8: branch_false: following 'false' branch... libxml2-2.13.9/globals.c:910:16: branch_false: ...to here libxml2-2.13.9/globals.c:910:16: call_function: calling 'xmlGetThreadLocalStorage' from 'xmlGetLocalRngState' libxml2-2.13.9/globals.c:910:16: return_function: returning to 'xmlGetLocalRngState' from 'xmlGetThreadLocalStorage' libxml2-2.13.9/globals.c:867:29: danger: 'xmlGetThreadLocalStorage(0)' leaks here; was allocated at [(10)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/9) # 865| xmlInitGlobalState(gs); # 866| #elif defined(HAVE_POSIX_THREADS) # 867|-> gs = (xmlGlobalState *) pthread_getspecific(globalkey); # 868| if (gs == NULL) # 869| gs = xmlNewGlobalState(allowFailure); Error: GCC_ANALYZER_WARNING (CWE-401): [#def11] libxml2-2.13.9/globals.c:867:29: warning[-Wanalyzer-malloc-leak]: leak of 'xmlGetThreadLocalStorage(1)' libxml2-2.13.9/globals.c:975:1: enter_function: entry to 'xmlCheckThreadLocalStorage' libxml2-2.13.9/globals.c:977:8: branch_true: following 'true' branch... libxml2-2.13.9/globals.c:977:42: branch_true: ...to here libxml2-2.13.9/globals.c:977:42: call_function: calling 'xmlGetThreadLocalStorage' from 'xmlCheckThreadLocalStorage' libxml2-2.13.9/globals.c:977:42: return_function: returning to 'xmlCheckThreadLocalStorage' from 'xmlGetThreadLocalStorage' libxml2-2.13.9/globals.c:867:29: danger: 'xmlGetThreadLocalStorage(1)' leaks here; was allocated at [(10)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/9) # 865| xmlInitGlobalState(gs); # 866| #elif defined(HAVE_POSIX_THREADS) # 867|-> gs = (xmlGlobalState *) pthread_getspecific(globalkey); # 868| if (gs == NULL) # 869| gs = xmlNewGlobalState(allowFailure); Error: GCC_ANALYZER_WARNING (CWE-835): [#def12] libxml2-2.13.9/hash.c:382:12: warning[-Wanalyzer-infinite-loop]: infinite loop # 380| */ # 381| oldentry = hash->table; # 382|-> while (oldentry->hashValue != 0) { # 383| if (++oldentry >= oldend) # 384| oldentry = hash->table; Error: GCC_ANALYZER_WARNING (CWE-476): [#def13] libxml2-2.13.9/hash.c:549:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'entry' libxml2-2.13.9/hash.c:1149:1: enter_function: entry to 'xmlHashCopySafe' libxml2-2.13.9/hash.c:1154:8: branch_false: following 'false' branch... libxml2-2.13.9/hash.c:1157:25: branch_false: ...to here libxml2-2.13.9/hash.c:1157:11: call_function: calling 'xmlHashCreate' from 'xmlHashCopySafe' libxml2-2.13.9/hash.c:1157:11: return_function: returning to 'xmlHashCopySafe' from 'xmlHashCreate' libxml2-2.13.9/hash.c:1158:8: branch_false: following 'false' branch... libxml2-2.13.9/hash.c:1161:9: branch_false: ...to here libxml2-2.13.9/hash.c:1161:8: branch_false: following 'false' branch... libxml2-2.13.9/hash.c:1164:12: branch_false: ...to here libxml2-2.13.9/hash.c:1166:31: branch_true: following 'true' branch (when 'entry < end')... libxml2-2.13.9/hash.c:1167:13: branch_true: ...to here libxml2-2.13.9/hash.c:1167:12: branch_true: following 'true' branch... libxml2-2.13.9/hash.c:1170:45: branch_true: ...to here libxml2-2.13.9/hash.c:1171:16: branch_false: following 'false' branch... libxml2-2.13.9/hash.c:1173:59: branch_false: ...to here libxml2-2.13.9/hash.c:1173:17: call_function: calling 'xmlHashAdd3' from 'xmlHashCopySafe' # 547| * Shift the remainder of the probe sequence to the right # 548| */ # 549|-> if (entry->hashValue != 0) { # 550| const xmlHashEntry *end = &hash->table[hash->size]; # 551| const xmlHashEntry *cur = entry; Error: GCC_ANALYZER_WARNING (CWE-476): [#def14] libxml2-2.13.9/list.c:280:5: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' libxml2-2.13.9/list.c:268:1: enter_function: entry to 'xmlListInsert' libxml2-2.13.9/list.c:274:15: call_function: calling 'xmlListLowerSearch' from 'xmlListInsert' libxml2-2.13.9/list.c:274:15: return_function: returning to 'xmlListInsert' from 'xmlListLowerSearch' libxml2-2.13.9/list.c:277:8: branch_false: following 'false' branch... libxml2-2.13.9/list.c:279:5: branch_false: ...to here libxml2-2.13.9/list.c:280:5: danger: dereference of NULL 'xmlListLowerSearch(l, data)' # 278| return (1); # 279| lkNew->data = data; # 280|-> lkPlace = lkPlace->prev; # 281| lkNew->next = lkPlace->next; # 282| (lkPlace->next)->prev = lkNew; Error: GCC_ANALYZER_WARNING (CWE-775): [#def15] libxml2-2.13.9/nanoftp.c:882:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*(struct xmlNanoFTPCtxt *)ctx.controlFd' libxml2-2.13.9/nanoftp.c:1865:1: enter_function: entry to 'xmlNanoFTPOpen' libxml2-2.13.9/nanoftp.c:1870:8: branch_false: following 'false' branch (when 'URL' is non-NULL)... libxml2-2.13.9/nanoftp.c:1871:9: branch_false: ...to here libxml2-2.13.9/nanoftp.c:1871:8: branch_false: following 'false' branch... libxml2-2.13.9/nanoftp.c:1873:32: branch_false: ...to here libxml2-2.13.9/nanoftp.c:1873:32: call_function: calling 'xmlNanoFTPNewCtxt' from 'xmlNanoFTPOpen' libxml2-2.13.9/nanoftp.c:1873:32: return_function: returning to 'xmlNanoFTPOpen' from 'xmlNanoFTPNewCtxt' libxml2-2.13.9/nanoftp.c:1874:8: branch_false: following 'false' branch... libxml2-2.13.9/nanoftp.c:1875:9: branch_false: ...to here libxml2-2.13.9/nanoftp.c:1875:9: call_function: calling 'xmlNanoFTPConnect' from 'xmlNanoFTPOpen' # 880| * Do the connect. # 881| */ # 882|-> if (connect(ctxt->controlFd, (struct sockaddr *) &ctxt->ftpAddr, # 883| addrlen) < 0) { # 884| __xmlIOErr(XML_FROM_FTP, 0, "Failed to create a connection"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def16] libxml2-2.13.9/nanoftp.c:1368:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*(struct xmlNanoFTPCtxt *)ctx.dataFd' libxml2-2.13.9/nanoftp.c:1714:1: enter_function: entry to 'xmlNanoFTPGetSocket' libxml2-2.13.9/nanoftp.c:1718:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.13.9/nanoftp.c:1720:8: branch_false: ...to here libxml2-2.13.9/nanoftp.c:1722:20: call_function: calling 'xmlNanoFTPGetConnection' from 'xmlNanoFTPGetSocket' # 1366| } # 1367| # 1368|-> if (connect(ctxt->dataFd, (struct sockaddr *) &dataAddr, dataAddrLen) < 0) { # 1369| __xmlIOErr(XML_FROM_FTP, 0, "Failed to create a data connection"); # 1370| closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; Error: GCC_ANALYZER_WARNING (CWE-775): [#def17] libxml2-2.13.9/nanoftp.c:1382:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*(struct xmlNanoFTPCtxt *)ctx.dataFd' libxml2-2.13.9/nanoftp.c:1714:1: enter_function: entry to 'xmlNanoFTPGetSocket' libxml2-2.13.9/nanoftp.c:1718:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.13.9/nanoftp.c:1720:8: branch_false: ...to here libxml2-2.13.9/nanoftp.c:1722:20: call_function: calling 'xmlNanoFTPGetConnection' from 'xmlNanoFTPGetSocket' # 1380| ((struct sockaddr_in *)&dataAddr)->sin_port = 0; # 1381| # 1382|-> if (bind(ctxt->dataFd, (struct sockaddr *) &dataAddr, dataAddrLen) < 0) { # 1383| __xmlIOErr(XML_FROM_FTP, 0, "bind failed"); # 1384| closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; Error: GCC_ANALYZER_WARNING (CWE-775): [#def18] libxml2-2.13.9/nanoftp.c:1389:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*(struct xmlNanoFTPCtxt *)ctx.dataFd' libxml2-2.13.9/nanoftp.c:1714:1: enter_function: entry to 'xmlNanoFTPGetSocket' libxml2-2.13.9/nanoftp.c:1718:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.13.9/nanoftp.c:1720:8: branch_false: ...to here libxml2-2.13.9/nanoftp.c:1722:20: call_function: calling 'xmlNanoFTPGetConnection' from 'xmlNanoFTPGetSocket' # 1387| getsockname(ctxt->dataFd, (struct sockaddr *) &dataAddr, &dataAddrLen); # 1388| # 1389|-> if (listen(ctxt->dataFd, 1) < 0) { # 1390| __xmlIOErr(XML_FROM_FTP, 0, "listen failed"); # 1391| closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; Error: GCC_ANALYZER_WARNING (CWE-775): [#def19] libxml2-2.13.9/nanoftp.c:1397:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor libxml2-2.13.9/nanoftp.c:1714:1: enter_function: entry to 'xmlNanoFTPGetSocket' libxml2-2.13.9/nanoftp.c:1718:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.13.9/nanoftp.c:1720:8: branch_false: ...to here libxml2-2.13.9/nanoftp.c:1722:20: call_function: calling 'xmlNanoFTPGetConnection' from 'xmlNanoFTPGetSocket' # 1395| if ((ctxt->ftpAddr).ss_family == AF_INET6) { # 1396| char buf6[INET6_ADDRSTRLEN]; # 1397|-> inet_ntop (AF_INET6, &((struct sockaddr_in6 *)&dataAddr)->sin6_addr, # 1398| buf6, INET6_ADDRSTRLEN); # 1399| adp = (unsigned char *) buf6; Error: GCC_ANALYZER_WARNING (CWE-775): [#def20] libxml2-2.13.9/nanoftp.c:1407:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor libxml2-2.13.9/nanoftp.c:1714:1: enter_function: entry to 'xmlNanoFTPGetSocket' libxml2-2.13.9/nanoftp.c:1718:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.13.9/nanoftp.c:1720:8: branch_false: ...to here libxml2-2.13.9/nanoftp.c:1722:20: call_function: calling 'xmlNanoFTPGetConnection' from 'xmlNanoFTPGetSocket' # 1405| adp = (unsigned char *) &((struct sockaddr_in *)&dataAddr)->sin_addr; # 1406| portp = (unsigned char *) &((struct sockaddr_in *)&dataAddr)->sin_port; # 1407|-> snprintf (buf, sizeof(buf), "PORT %d,%d,%d,%d,%d,%d\r\n", # 1408| adp[0] & 0xff, adp[1] & 0xff, adp[2] & 0xff, adp[3] & 0xff, # 1409| portp[0] & 0xff, portp[1] & 0xff); Error: CPPCHECK_WARNING (CWE-562): [#def21] libxml2-2.13.9/nanohttp.c:632: error[returnDanglingLifetime]: Returning pointer to local variable 'buf' that will be invalid when returning. # 630| else # 631| *bp = 0; # 632|-> return(xmlMemStrdup(buf)); # 633| } # 634| else if ( rc == -1 ) { Error: CPPCHECK_WARNING (CWE-457): [#def22] libxml2-2.13.9/parser.c:8660: warning[uninitvar]: Uninitialized variable: p.hashValue # 8658| } # 8659| # 8660|-> *prefix = p; # 8661| return(l); # 8662| } Error: CPPCHECK_WARNING (CWE-457): [#def23] libxml2-2.13.9/python/libxml.c:1516: error[uninitvar]: Uninitialized variable: *ptr # 1514| #if PY_MAJOR_VERSION >= 3 # 1515| /* Ensure the error string doesn't start at UTF8 continuation. */ # 1516|-> while (*ptr && (*ptr & 0xc0) == 0x80) # 1517| ptr++; # 1518| #endif Error: COMPILER_WARNING (CWE-681): [#def24] libxml2-2.13.9/python/libxml.c: scope_hint: In function 'libxml_xmlErrorFuncHandler' libxml2-2.13.9/python/libxml.c:1523:43: warning[-Wpointer-sign]: pointer targets in passing argument 1 of 'libxml_charPtrConstWrap' differ in signedness # 1523 | message = libxml_charPtrConstWrap(ptr); # | ^~~ # | | # | unsigned char * libxml2-2.13.9/python/libxml.c:29: included_from: Included from here. libxml2-2.13.9/python/libxml_wrap.h:265:48: note: expected 'const char *' but argument is of type 'unsigned char *' # 265 | PyObject * libxml_charPtrConstWrap(const char *str); # | ~~~~~~~~~~~~^~~ # 1521| PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt); # 1522| Py_XINCREF(libxml_xmlPythonErrorFuncCtxt); # 1523|-> message = libxml_charPtrConstWrap(ptr); # 1524| PyTuple_SetItem(list, 1, message); # 1525| result = PyObject_CallObject(libxml_xmlPythonErrorFuncHandler, list); Error: GCC_ANALYZER_WARNING (CWE-476): [#def25] libxml2-2.13.9/python/libxml.c:1669:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml.c:1665:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:1668:31: branch_false: ...to here libxml2-2.13.9/python/libxml.c:1668:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:1669:9: branch_false: ...to here libxml2-2.13.9/python/libxml.c:1669:9: danger: dereference of NULL 'ctxt' # 1667| return(NULL); # 1668| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 1669|-> if (ctxt->_private == NULL) { # 1670| pyCtxt = xmlMalloc(sizeof(xmlParserCtxtPyCtxt)); # 1671| if (pyCtxt == NULL) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def26] libxml2-2.13.9/python/libxml.c:1719:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml.c:1714:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:1717:31: branch_false: ...to here libxml2-2.13.9/python/libxml.c:1717:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:1718:17: branch_false: ...to here libxml2-2.13.9/python/libxml.c:1719:9: danger: dereference of NULL 'ctxt' # 1717| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 1718| py_retval = PyTuple_New(2); # 1719|-> if (ctxt->_private != NULL) { # 1720| pyCtxt = (xmlParserCtxtPyCtxtPtr)ctxt->_private; # 1721| Error: GCC_ANALYZER_WARNING (CWE-476): [#def27] libxml2-2.13.9/python/libxml.c:1877:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml.c:1841:1: enter_function: entry to 'libxml_xmlSetValidErrors' libxml2-2.13.9/python/libxml.c:1851:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:1855:12: branch_false: ...to here libxml2-2.13.9/python/libxml.c:1855:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:1856:14: branch_false: ...to here libxml2-2.13.9/python/libxml.c:1857:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:1861:5: branch_false: ...to here libxml2-2.13.9/python/libxml.c:1865:5: call_function: calling 'Py_XDECREF' from 'libxml_xmlSetValidErrors' libxml2-2.13.9/python/libxml.c:1865:5: return_function: returning to 'libxml_xmlSetValidErrors' from 'Py_XDECREF' libxml2-2.13.9/python/libxml.c:1877:5: danger: dereference of NULL 'ctxt' # 1875| pyCtxt->arg = pyobj_arg; # 1876| # 1877|-> ctxt->error = libxml_xmlValidCtxtErrorFuncHandler; # 1878| ctxt->warning = libxml_xmlValidCtxtWarningFuncHandler; # 1879| ctxt->userData = pyCtxt; Error: GCC_ANALYZER_WARNING (CWE-476): [#def28] libxml2-2.13.9/python/libxml.c:1896:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.13.9/python/libxml.c:1892:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:1894:29: branch_false: ...to here libxml2-2.13.9/python/libxml.c:1894:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:1896:5: branch_false: ...to here libxml2-2.13.9/python/libxml.c:1896:5: danger: dereference of NULL 'cur' # 1894| cur = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_cur); # 1895| # 1896|-> pyCtxt = (xmlValidCtxtPyCtxtPtr)(cur->userData); # 1897| if (pyCtxt != NULL) # 1898| { Error: GCC_ANALYZER_WARNING (CWE-476): [#def29] libxml2-2.13.9/python/libxml.c:2282:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.13.9/python/libxml.c:2278:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2280:11: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2280:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2282:13: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2282:13: danger: dereference of NULL 'cur' # 2280| cur = PyxmlNode_Get(obj); # 2281| # 2282|-> switch (cur->type) { # 2283| case XML_DOCUMENT_NODE: # 2284| case XML_HTML_DOCUMENT_NODE:{ Error: GCC_ANALYZER_WARNING (CWE-476): [#def30] libxml2-2.13.9/python/libxml.c:2322:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.13.9/python/libxml.c:2318:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2320:11: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2320:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2322:13: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2322:13: danger: dereference of NULL 'cur' # 2320| cur = PyxmlNode_Get(obj); # 2321| # 2322|-> switch (cur->type) { # 2323| case XML_DOCUMENT_NODE: # 2324| case XML_HTML_DOCUMENT_NODE: Error: GCC_ANALYZER_WARNING (CWE-476): [#def31] libxml2-2.13.9/python/libxml.c:2373:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.13.9/python/libxml.c:2369:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2371:11: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2371:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2373:13: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2373:13: danger: dereference of NULL 'cur' # 2371| cur = PyxmlNode_Get(obj); # 2372| # 2373|-> switch (cur->type) { # 2374| case XML_DOCUMENT_NODE: # 2375| case XML_HTML_DOCUMENT_NODE: Error: GCC_ANALYZER_WARNING (CWE-476): [#def32] libxml2-2.13.9/python/libxml.c:2410:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.13.9/python/libxml.c:2406:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2408:11: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2408:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2410:13: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2410:13: danger: dereference of NULL 'cur' # 2408| cur = PyxmlNode_Get(obj); # 2409| # 2410|-> switch (cur->type) { # 2411| case XML_DOCUMENT_NODE: # 2412| case XML_HTML_DOCUMENT_NODE: Error: GCC_ANALYZER_WARNING (CWE-476): [#def33] libxml2-2.13.9/python/libxml.c:2443:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.13.9/python/libxml.c:2439:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2441:11: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2441:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2443:13: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2443:13: danger: dereference of NULL 'cur' # 2441| cur = PyxmlNode_Get(obj); # 2442| # 2443|-> switch (cur->type) { # 2444| case XML_ELEMENT_NODE: # 2445| case XML_ENTITY_REF_NODE: Error: GCC_ANALYZER_WARNING (CWE-476): [#def34] libxml2-2.13.9/python/libxml.c:2479:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.13.9/python/libxml.c:2475:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2477:11: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2477:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2479:13: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2479:13: danger: dereference of NULL 'cur' # 2477| cur = PyxmlNode_Get(obj); # 2478| # 2479|-> switch (cur->type) { # 2480| case XML_ELEMENT_NODE: # 2481| case XML_ENTITY_REF_NODE: Error: GCC_ANALYZER_WARNING (CWE-476): [#def35] libxml2-2.13.9/python/libxml.c:2515:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.13.9/python/libxml.c:2511:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2513:11: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2513:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2515:13: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2515:13: danger: dereference of NULL 'cur' # 2513| cur = PyxmlNode_Get(obj); # 2514| # 2515|-> switch (cur->type) { # 2516| case XML_DOCUMENT_NODE: # 2517| case XML_HTML_DOCUMENT_NODE: Error: GCC_ANALYZER_WARNING (CWE-476): [#def36] libxml2-2.13.9/python/libxml.c:2920:26: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml.c:2914:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2917:31: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2917:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml.c:2919:9: branch_false: ...to here libxml2-2.13.9/python/libxml.c:2919:8: branch_true: following 'true' branch... libxml2-2.13.9/python/libxml.c:2920:26: branch_true: ...to here libxml2-2.13.9/python/libxml.c:2920:26: danger: dereference of NULL 'ctxt' # 2918| # 2919| if (URL != NULL) { # 2920|-> ctxt->catalogs = xmlCatalogAddLocal(ctxt->catalogs, URL); # 2921| } # 2922| Error: GCC_ANALYZER_WARNING (CWE-476): [#def37] libxml2-2.13.9/python/libxml2-py.c:2645:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'Error' libxml2-2.13.9/python/libxml2-py.c:2641:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:2643:27: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:2643:13: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:2645:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:2645:5: danger: dereference of NULL 'Error' # 2643| Error = (xmlErrorPtr) PyError_Get(pyobj_Error); # 2644| # 2645|-> c_retval = Error->code; # 2646| py_retval = libxml_intWrap((int) c_retval); # 2647| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def38] libxml2-2.13.9/python/libxml2-py.c:2661:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'Error' libxml2-2.13.9/python/libxml2-py.c:2657:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:2659:27: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:2659:13: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:2661:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:2661:5: danger: dereference of NULL 'Error' # 2659| Error = (xmlErrorPtr) PyError_Get(pyobj_Error); # 2660| # 2661|-> c_retval = Error->domain; # 2662| py_retval = libxml_intWrap((int) c_retval); # 2663| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def39] libxml2-2.13.9/python/libxml2-py.c:2677:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'Error' libxml2-2.13.9/python/libxml2-py.c:2673:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:2675:27: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:2675:13: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:2677:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:2677:5: danger: dereference of NULL 'Error' # 2675| Error = (xmlErrorPtr) PyError_Get(pyobj_Error); # 2676| # 2677|-> c_retval = Error->file; # 2678| py_retval = libxml_charPtrConstWrap((const char *) c_retval); # 2679| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def40] libxml2-2.13.9/python/libxml2-py.c:2693:16: warning[-Wanalyzer-null-dereference]: dereference of NULL 'Error' libxml2-2.13.9/python/libxml2-py.c:2689:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:2691:27: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:2691:13: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:2693:16: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:2693:16: danger: dereference of NULL 'Error' # 2691| Error = (xmlErrorPtr) PyError_Get(pyobj_Error); # 2692| # 2693|-> c_retval = Error->level; # 2694| py_retval = libxml_intWrap((int) c_retval); # 2695| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def41] libxml2-2.13.9/python/libxml2-py.c:2709:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'Error' libxml2-2.13.9/python/libxml2-py.c:2705:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:2707:27: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:2707:13: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:2709:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:2709:5: danger: dereference of NULL 'Error' # 2707| Error = (xmlErrorPtr) PyError_Get(pyobj_Error); # 2708| # 2709|-> c_retval = Error->line; # 2710| py_retval = libxml_intWrap((int) c_retval); # 2711| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def42] libxml2-2.13.9/python/libxml2-py.c:2725:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'Error' libxml2-2.13.9/python/libxml2-py.c:2721:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:2723:27: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:2723:13: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:2725:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:2725:5: danger: dereference of NULL 'Error' # 2723| Error = (xmlErrorPtr) PyError_Get(pyobj_Error); # 2724| # 2725|-> c_retval = Error->message; # 2726| py_retval = libxml_charPtrConstWrap((const char *) c_retval); # 2727| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def43] libxml2-2.13.9/python/libxml2-py.c:5927:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:5923:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:5925:31: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:5925:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:5927:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:5927:5: danger: dereference of NULL 'ctxt' # 5925| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 5926| # 5927|-> c_retval = ctxt->myDoc; # 5928| py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval); # 5929| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def44] libxml2-2.13.9/python/libxml2-py.c:5943:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:5939:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:5941:31: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:5941:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:5943:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:5943:5: danger: dereference of NULL 'ctxt' # 5941| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 5942| # 5943|-> c_retval = ctxt->valid; # 5944| py_retval = libxml_intWrap((int) c_retval); # 5945| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def45] libxml2-2.13.9/python/libxml2-py.c:5959:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:5955:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:5957:31: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:5957:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:5959:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:5959:5: danger: dereference of NULL 'ctxt' # 5957| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 5958| # 5959|-> c_retval = ctxt->wellFormed; # 5960| py_retval = libxml_intWrap((int) c_retval); # 5961| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def46] libxml2-2.13.9/python/libxml2-py.c:6066:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:6062:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:6064:31: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:6064:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:6066:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:6066:5: danger: dereference of NULL 'ctxt' # 6064| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 6065| # 6066|-> ctxt->linenumbers = linenumbers; # 6067| Py_INCREF(Py_None); # 6068| return(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def47] libxml2-2.13.9/python/libxml2-py.c:6081:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:6077:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:6079:31: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:6079:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:6081:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:6081:5: danger: dereference of NULL 'ctxt' # 6079| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 6080| # 6081|-> ctxt->loadsubset = loadsubset; # 6082| Py_INCREF(Py_None); # 6083| return(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def48] libxml2-2.13.9/python/libxml2-py.c:6096:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:6092:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:6094:31: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:6094:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:6096:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:6096:5: danger: dereference of NULL 'ctxt' # 6094| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 6095| # 6096|-> ctxt->pedantic = pedantic; # 6097| Py_INCREF(Py_None); # 6098| return(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def49] libxml2-2.13.9/python/libxml2-py.c:6111:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:6107:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:6109:31: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:6109:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:6111:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:6111:5: danger: dereference of NULL 'ctxt' # 6109| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 6110| # 6111|-> ctxt->replaceEntities = replaceEntities; # 6112| Py_INCREF(Py_None); # 6113| return(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def50] libxml2-2.13.9/python/libxml2-py.c:6126:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:6122:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:6124:31: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:6124:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:6126:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:6126:5: danger: dereference of NULL 'ctxt' # 6124| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 6125| # 6126|-> ctxt->validate = validate; # 6127| Py_INCREF(Py_None); # 6128| return(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def51] libxml2-2.13.9/python/libxml2-py.c:13179:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13175:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13177:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13177:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13179:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13179:5: danger: dereference of NULL 'URI' #13177| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13178| #13179|-> c_retval = URI->authority; #13180| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #13181| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def52] libxml2-2.13.9/python/libxml2-py.c:13195:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13191:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13193:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13193:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13195:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13195:5: danger: dereference of NULL 'URI' #13193| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13194| #13195|-> c_retval = URI->fragment; #13196| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #13197| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def53] libxml2-2.13.9/python/libxml2-py.c:13211:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13207:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13209:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13209:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13211:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13211:5: danger: dereference of NULL 'URI' #13209| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13210| #13211|-> c_retval = URI->opaque; #13212| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #13213| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def54] libxml2-2.13.9/python/libxml2-py.c:13227:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13223:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13225:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13225:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13227:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13227:5: danger: dereference of NULL 'URI' #13225| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13226| #13227|-> c_retval = URI->path; #13228| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #13229| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def55] libxml2-2.13.9/python/libxml2-py.c:13243:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13239:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13241:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13241:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13243:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13243:5: danger: dereference of NULL 'URI' #13241| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13242| #13243|-> c_retval = URI->port; #13244| py_retval = libxml_intWrap((int) c_retval); #13245| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def56] libxml2-2.13.9/python/libxml2-py.c:13259:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13255:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13257:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13257:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13259:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13259:5: danger: dereference of NULL 'URI' #13257| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13258| #13259|-> c_retval = URI->query; #13260| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #13261| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def57] libxml2-2.13.9/python/libxml2-py.c:13275:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13271:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13273:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13273:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13275:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13275:5: danger: dereference of NULL 'URI' #13273| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13274| #13275|-> c_retval = URI->query_raw; #13276| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #13277| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def58] libxml2-2.13.9/python/libxml2-py.c:13291:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13287:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13289:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13289:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13291:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13291:5: danger: dereference of NULL 'URI' #13289| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13290| #13291|-> c_retval = URI->scheme; #13292| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #13293| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def59] libxml2-2.13.9/python/libxml2-py.c:13307:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13303:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13305:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13305:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13307:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13307:5: danger: dereference of NULL 'URI' #13305| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13306| #13307|-> c_retval = URI->server; #13308| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #13309| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def60] libxml2-2.13.9/python/libxml2-py.c:13323:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13319:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13321:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13321:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13323:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13323:5: danger: dereference of NULL 'URI' #13321| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13322| #13323|-> c_retval = URI->user; #13324| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #13325| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def61] libxml2-2.13.9/python/libxml2-py.c:13338:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13334:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13336:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13336:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13338:9: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13338:9: danger: dereference of NULL 'URI' #13336| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13337| #13338|-> if (URI->authority != NULL) xmlFree(URI->authority); #13339| URI->authority = (char *)xmlStrdup((const xmlChar *)authority); #13340| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def62] libxml2-2.13.9/python/libxml2-py.c:13354:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13350:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13352:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13352:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13354:9: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13354:9: danger: dereference of NULL 'URI' #13352| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13353| #13354|-> if (URI->fragment != NULL) xmlFree(URI->fragment); #13355| URI->fragment = (char *)xmlStrdup((const xmlChar *)fragment); #13356| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def63] libxml2-2.13.9/python/libxml2-py.c:13370:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13366:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13368:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13368:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13370:9: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13370:9: danger: dereference of NULL 'URI' #13368| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13369| #13370|-> if (URI->opaque != NULL) xmlFree(URI->opaque); #13371| URI->opaque = (char *)xmlStrdup((const xmlChar *)opaque); #13372| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def64] libxml2-2.13.9/python/libxml2-py.c:13386:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13382:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13384:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13384:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13386:9: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13386:9: danger: dereference of NULL 'URI' #13384| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13385| #13386|-> if (URI->path != NULL) xmlFree(URI->path); #13387| URI->path = (char *)xmlStrdup((const xmlChar *)path); #13388| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def65] libxml2-2.13.9/python/libxml2-py.c:13402:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13398:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13400:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13400:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13402:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13402:5: danger: dereference of NULL 'URI' #13400| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13401| #13402|-> URI->port = port; #13403| Py_INCREF(Py_None); #13404| return(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def66] libxml2-2.13.9/python/libxml2-py.c:13417:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13413:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13415:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13415:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13417:9: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13417:9: danger: dereference of NULL 'URI' #13415| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13416| #13417|-> if (URI->query != NULL) xmlFree(URI->query); #13418| URI->query = (char *)xmlStrdup((const xmlChar *)query); #13419| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def67] libxml2-2.13.9/python/libxml2-py.c:13433:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13429:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13431:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13431:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13433:9: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13433:9: danger: dereference of NULL 'URI' #13431| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13432| #13433|-> if (URI->query_raw != NULL) xmlFree(URI->query_raw); #13434| URI->query_raw = (char *)xmlStrdup((const xmlChar *)query_raw); #13435| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def68] libxml2-2.13.9/python/libxml2-py.c:13449:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13445:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13447:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13447:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13449:9: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13449:9: danger: dereference of NULL 'URI' #13447| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13448| #13449|-> if (URI->scheme != NULL) xmlFree(URI->scheme); #13450| URI->scheme = (char *)xmlStrdup((const xmlChar *)scheme); #13451| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def69] libxml2-2.13.9/python/libxml2-py.c:13465:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13461:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13463:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13463:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13465:9: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13465:9: danger: dereference of NULL 'URI' #13463| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13464| #13465|-> if (URI->server != NULL) xmlFree(URI->server); #13466| URI->server = (char *)xmlStrdup((const xmlChar *)server); #13467| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def70] libxml2-2.13.9/python/libxml2-py.c:13481:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.13.9/python/libxml2-py.c:13477:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13479:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13479:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:13481:9: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:13481:9: danger: dereference of NULL 'URI' #13479| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #13480| #13481|-> if (URI->user != NULL) xmlFree(URI->user); #13482| URI->user = (char *)xmlStrdup((const xmlChar *)user); #13483| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def71] libxml2-2.13.9/python/libxml2-py.c:14773:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:14769:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:14771:33: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:14771:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:14773:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:14773:5: danger: dereference of NULL 'ctxt' #14771| ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt); #14772| #14773|-> c_retval = ctxt->doc; #14774| py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval); #14775| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def72] libxml2-2.13.9/python/libxml2-py.c:14791:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:14787:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:14789:33: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:14789:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:14791:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:14791:5: danger: dereference of NULL 'ctxt' #14789| ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt); #14790| #14791|-> c_retval = ctxt->node; #14792| py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval); #14793| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def73] libxml2-2.13.9/python/libxml2-py.c:14809:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:14805:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:14807:33: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:14807:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:14809:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:14809:5: danger: dereference of NULL 'ctxt' #14807| ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt); #14808| #14809|-> c_retval = ctxt->proximityPosition; #14810| py_retval = libxml_intWrap((int) c_retval); #14811| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def74] libxml2-2.13.9/python/libxml2-py.c:14827:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:14823:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:14825:33: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:14825:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:14827:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:14827:5: danger: dereference of NULL 'ctxt' #14825| ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt); #14826| #14827|-> c_retval = ctxt->contextSize; #14828| py_retval = libxml_intWrap((int) c_retval); #14829| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def75] libxml2-2.13.9/python/libxml2-py.c:14845:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:14841:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:14843:33: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:14843:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:14845:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:14845:5: danger: dereference of NULL 'ctxt' #14843| ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt); #14844| #14845|-> c_retval = ctxt->function; #14846| py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval); #14847| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def76] libxml2-2.13.9/python/libxml2-py.c:14863:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:14859:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:14861:33: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:14861:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:14863:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:14863:5: danger: dereference of NULL 'ctxt' #14861| ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt); #14862| #14863|-> c_retval = ctxt->functionURI; #14864| py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval); #14865| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def77] libxml2-2.13.9/python/libxml2-py.c:15651:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:15647:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:15649:39: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:15649:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:15651:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:15651:5: danger: dereference of NULL 'ctxt' #15649| ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt); #15650| #15651|-> c_retval = ctxt->context; #15652| py_retval = libxml_xmlXPathContextPtrWrap((xmlXPathContextPtr) c_retval); #15653| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def78] libxml2-2.13.9/python/libxml2-py.c:15860:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:15855:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:15857:33: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:15857:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:15858:23: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:15858:11: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:15860:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:15860:5: danger: dereference of NULL 'ctxt' #15858| doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc); #15859| #15860|-> ctxt->doc = doc; #15861| Py_INCREF(Py_None); #15862| return(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def79] libxml2-2.13.9/python/libxml2-py.c:15879:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.13.9/python/libxml2-py.c:15874:8: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:15876:33: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:15876:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:15877:25: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:15877:12: branch_false: following 'false' branch... libxml2-2.13.9/python/libxml2-py.c:15879:5: branch_false: ...to here libxml2-2.13.9/python/libxml2-py.c:15879:5: danger: dereference of NULL 'ctxt' #15877| node = (xmlNodePtr) PyxmlNode_Get(pyobj_node); #15878| #15879|-> ctxt->node = node; #15880| Py_INCREF(Py_None); #15881| return(Py_None); Error: CPPCHECK_WARNING (CWE-476): [#def80] libxml2-2.13.9/schematron.c:1053: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: let # 1051| # 1052| let = (xmlSchematronLetPtr) malloc(sizeof(xmlSchematronLet)); # 1053|-> let->name = name; # 1054| let->comp = var_comp; # 1055| let->next = NULL; Error: CPPCHECK_WARNING (CWE-476): [#def81] libxml2-2.13.9/schematron.c:1054: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: let # 1052| let = (xmlSchematronLetPtr) malloc(sizeof(xmlSchematronLet)); # 1053| let->name = name; # 1054|-> let->comp = var_comp; # 1055| let->next = NULL; # 1056| Error: CPPCHECK_WARNING (CWE-476): [#def82] libxml2-2.13.9/schematron.c:1055: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: let # 1053| let->name = name; # 1054| let->comp = var_comp; # 1055|-> let->next = NULL; # 1056| # 1057| /* add new let variable to the beginning of the list */ Error: CPPCHECK_WARNING (CWE-562): [#def83] libxml2-2.13.9/xmlIO.c:2976: error[returnDanglingLifetime]: Returning pointer to local variable 'dir' that will be invalid when returning. # 2974| ret = xmlMemStrdup("."); # 2975| } # 2976|-> return(ret); # 2977| #undef IS_XMLPGD_SEP # 2978| } Error: GCC_ANALYZER_WARNING (CWE-457): [#def84] libxml2-2.13.9/xmlcatalog.c:86:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&line_read’ libxml2-2.13.9/xmlcatalog.c:80:8: branch_false: following ‘false’ branch... libxml2-2.13.9/xmlcatalog.c:82:5: branch_false: ...to here libxml2-2.13.9/xmlcatalog.c:85:8: branch_true: following ‘true’ branch (when ‘ret’ is non-NULL)... libxml2-2.13.9/xmlcatalog.c:86:9: branch_true: ...to here libxml2-2.13.9/xmlcatalog.c:86:9: danger: use of uninitialized value ‘&line_read’ here # 84| ret = (char *) malloc(len + 1); # 85| if (ret != NULL) { # 86|-> memcpy (ret, line_read, len + 1); # 87| } # 88| return(ret); Error: CPPCHECK_WARNING (CWE-401): [#def85] libxml2-2.13.9/xmlmemory.c:287: error[memleak]: Memory leak: p # 285| memcpy(s, str, size); # 286| # 287|-> return(s); # 288| } # 289| Error: COMPILER_WARNING (CWE-457): [#def86] libxml2-2.13.9/xmlschemas.c: scope_hint: In function 'xmlSchemaErr4Line' libxml2-2.13.9/xmlschemas.c:2192:30: warning[-Wmaybe-uninitialized]: 'f' may be used uninitialized # 2192 | file = f; # | ~~~~~^~~ libxml2-2.13.9/xmlschemas.c:2189:33: note: 'f' declared here # 2189 | const char *f; # | ^ # 2190| vctxt->locFunc(vctxt->locCtxt, &f, &l); # 2191| if (file == NULL) # 2192|-> file = f; # 2193| if (line == 0) # 2194| line = (int) l; Error: CPPCHECK_WARNING (CWE-758): [#def87] libxml2-2.13.9/xmlschemas.c:27753: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour #27751| */ #27752| for (i = 1; i < (int) sizeof(int) * 8; i++) { #27753|-> if (options & 1<<i) #27754| return (-1); #27755| } Error: CPPCHECK_WARNING (CWE-457): [#def88] libxml2-2.13.9/xpath.c:8503: warning[uninitvar]: Uninitialized variable: theLang # 8501| cur = cur->parent; # 8502| } # 8503|-> if ((theLang != NULL) && (lang != NULL)) { # 8504| for (i = 0;lang[i] != 0;i++) # 8505| if (toupper(lang[i]) != toupper(theLang[i]))
| analyzer-version-clippy | 1.97.1 |
| analyzer-version-cppcheck | 2.21.1 |
| analyzer-version-gcc | 16.1.1 |
| analyzer-version-gcc-analyzer | 16.1.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-148.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | libxml2-2.13.9-4.fc45 |
| store-results-to | /tmp/tmp7v2j2sjl/libxml2-2.13.9-4.fc45.tar.xz |
| time-created | 2026-08-03 18:13:53 |
| time-finished | 2026-08-03 18:17:47 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmp7v2j2sjl/libxml2-2.13.9-4.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp7v2j2sjl/libxml2-2.13.9-4.fc45.src.rpm' |
| tool-version | csmock-3.8.7.20260803.142340.gb75b18e-1.el9 |