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.12.10/HTMLparser.c: scope_hint: In function 'htmlCheckAutoClose' libxml2-2.12.10/HTMLparser.c:1449:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type # 1449 | res = bsearch(&key, htmlStartClose, # | ^ # 1447| key.oldTag = (const char *) oldtag; # 1448| key.newTag = (const char *) newtag; # 1449|-> res = bsearch(&key, htmlStartClose, # 1450| sizeof(htmlStartClose) / sizeof(htmlStartCloseEntry), # 1451| sizeof(htmlStartCloseEntry), htmlCompareStartClose); Error: COMPILER_WARNING (CWE-704): [#def3] libxml2-2.12.10/HTMLparser.c:1449:9: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type # 1447| key.oldTag = (const char *) oldtag; # 1448| key.newTag = (const char *) newtag; # 1449|-> res = bsearch(&key, htmlStartClose, # 1450| sizeof(htmlStartClose) / sizeof(htmlStartCloseEntry), # 1451| sizeof(htmlStartCloseEntry), htmlCompareStartClose); Error: CPPCHECK_WARNING (CWE-457): [#def4] libxml2-2.12.10/HTMLparser.c:2551: warning[uninitvar]: Uninitialized variable: loc # 2549| } # 2550| # 2551|-> ret = xmlDictLookup(ctxt->dict, loc, i); # 2552| if (ret == NULL) # 2553| htmlErrMemory(ctxt, NULL); Error: CPPCHECK_WARNING (CWE-457): [#def5] libxml2-2.12.10/HTMLparser.c:2586: warning[uninitvar]: Uninitialized variable: loc # 2584| } # 2585| # 2586|-> return(xmlDictLookup(ctxt->dict, loc, i)); # 2587| } # 2588| Error: CPPCHECK_WARNING (CWE-457): [#def6] libxml2-2.12.10/catalog.c:2261: warning[uninitvar]: Uninitialized variable: buf # 2259| return(NULL); # 2260| } # 2261|-> *name = xmlStrndup(buf, len); # 2262| return(cur); # 2263| } Error: GCC_ANALYZER_WARNING (CWE-835): [#def7] libxml2-2.12.10/dict.c:637:12: warning[-Wanalyzer-infinite-loop]: infinite loop # 635| */ # 636| oldentry = dict->table; # 637|-> while (oldentry->hashValue != 0) { # 638| if (++oldentry >= oldend) # 639| oldentry = dict->table; Error: GCC_ANALYZER_WARNING (CWE-476): [#def8] libxml2-2.12.10/dict.c:777:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'entry' libxml2-2.12.10/dict.c:894:1: enter_function: entry to 'xmlDictQLookup' libxml2-2.12.10/dict.c:897:13: call_function: calling 'xmlDictLookupInternal' from 'xmlDictQLookup' # 775| * Shift the remainder of the probe sequence to the right # 776| */ # 777|-> if (entry->hashValue != 0) { # 778| const xmlDictEntry *end = &dict->table[dict->size]; # 779| const xmlDictEntry *cur = entry; Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] libxml2-2.12.10/encoding.c:1729:8: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open("UTF-8", name)' libxml2-2.12.10/encoding.c:1700:8: branch_false: following 'false' branch... libxml2-2.12.10/encoding.c:1706:5: branch_false: ...to here libxml2-2.12.10/encoding.c:1706:16: branch_true: following 'true' branch (when 'i != 99')... libxml2-2.12.10/encoding.c:1707:27: branch_true: ...to here libxml2-2.12.10/encoding.c:1712:17: branch_true: following 'true' branch (when 'i != 8')... libxml2-2.12.10/encoding.c:1713:27: branch_true: ...to here libxml2-2.12.10/encoding.c:1713:12: branch_false: following 'false' branch (when the strings are non-equal)... libxml2-2.12.10/encoding.c:1712:49: branch_false: ...to here libxml2-2.12.10/encoding.c:1713:12: branch_false: following 'false' branch (when the strings are non-equal)... libxml2-2.12.10/encoding.c:1712:49: branch_false: ...to here libxml2-2.12.10/encoding.c:1727:14: acquire_memory: allocated here libxml2-2.12.10/encoding.c:1729:8: danger: 'iconv_open("UTF-8", name)' leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10) # 1727| icv_in = iconv_open("UTF-8", name); # 1728| icv_out = iconv_open(name, "UTF-8"); # 1729|-> if (icv_in == (iconv_t) -1) { # 1730| icv_in = iconv_open("UTF-8", upper); # 1731| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] libxml2-2.12.10/encoding.c:1732:8: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open(name, "UTF-8")' libxml2-2.12.10/encoding.c:1700:8: branch_false: following 'false' branch... libxml2-2.12.10/encoding.c:1706:5: branch_false: ...to here libxml2-2.12.10/encoding.c:1706:16: branch_true: following 'true' branch (when 'i != 99')... libxml2-2.12.10/encoding.c:1707:27: branch_true: ...to here libxml2-2.12.10/encoding.c:1712:17: branch_true: following 'true' branch (when 'i != 8')... libxml2-2.12.10/encoding.c:1713:27: branch_true: ...to here libxml2-2.12.10/encoding.c:1713:12: branch_false: following 'false' branch (when the strings are non-equal)... libxml2-2.12.10/encoding.c:1712:49: branch_false: ...to here libxml2-2.12.10/encoding.c:1713:12: branch_false: following 'false' branch (when the strings are non-equal)... libxml2-2.12.10/encoding.c:1712:49: branch_false: ...to here libxml2-2.12.10/encoding.c:1728:15: acquire_memory: allocated here libxml2-2.12.10/encoding.c:1729:8: branch_false: following 'false' branch... libxml2-2.12.10/encoding.c:1732:8: branch_false: ...to here libxml2-2.12.10/encoding.c:1732:8: danger: 'iconv_open(name, "UTF-8")' leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10) # 1730| icv_in = iconv_open("UTF-8", upper); # 1731| } # 1732|-> if (icv_out == (iconv_t) -1) { # 1733| icv_out = iconv_open(upper, "UTF-8"); # 1734| } Error: GCC_ANALYZER_WARNING (CWE-835): [#def11] libxml2-2.12.10/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): [#def12] libxml2-2.12.10/hash.c:556:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'entry' libxml2-2.12.10/hash.c:1050:1: enter_function: entry to 'xmlHashCopy' libxml2-2.12.10/hash.c:1054:8: branch_false: following 'false' branch... libxml2-2.12.10/hash.c:1057:25: branch_false: ...to here libxml2-2.12.10/hash.c:1057:11: call_function: calling 'xmlHashCreate' from 'xmlHashCopy' libxml2-2.12.10/hash.c:1057:11: return_function: returning to 'xmlHashCopy' from 'xmlHashCreate' libxml2-2.12.10/hash.c:1058:8: branch_false: following 'false' branch... libxml2-2.12.10/hash.c:1061:9: branch_false: ...to here libxml2-2.12.10/hash.c:1061:8: branch_false: following 'false' branch... libxml2-2.12.10/hash.c:1064:12: branch_false: ...to here libxml2-2.12.10/hash.c:1066:31: branch_true: following 'true' branch (when 'entry < end')... libxml2-2.12.10/hash.c:1067:13: branch_true: ...to here libxml2-2.12.10/hash.c:1067:12: branch_true: following 'true' branch... libxml2-2.12.10/hash.c:1069:51: branch_true: ...to here libxml2-2.12.10/hash.c:1068:13: call_function: calling 'xmlHashAddEntry3' from 'xmlHashCopy' # 554| * Shift the remainder of the probe sequence to the right # 555| */ # 556|-> if (entry->hashValue != 0) { # 557| const xmlHashEntry *end = &hash->table[hash->size]; # 558| const xmlHashEntry *cur = entry; Error: GCC_ANALYZER_WARNING (CWE-835): [#def13] libxml2-2.12.10/hash.c:931:12: warning[-Wanalyzer-infinite-loop]: infinite loop libxml2-2.12.10/hash.c:931:12: danger: infinite loop here libxml2-2.12.10/hash.c:931:12: branch_true: if it ever follows 'true' branch, it will always do so... libxml2-2.12.10/hash.c:932:12: branch_true: ...to here libxml2-2.12.10/hash.c:932:12: branch_true: when 'end <= entry': always following 'true' branch... libxml2-2.12.10/hash.c:932:12: branch_true: ...to here # 929| entry = hash->table; # 930| end = &hash->table[hash->size]; # 931|-> while (entry->hashValue != 0) { # 932| if (++entry >= end) # 933| entry = hash->table; Error: GCC_ANALYZER_WARNING (CWE-835): [#def14] libxml2-2.12.10/hash.c:1011:12: warning[-Wanalyzer-infinite-loop]: infinite loop libxml2-2.12.10/hash.c:1011:12: danger: infinite loop here libxml2-2.12.10/hash.c:1011:12: branch_true: if it ever follows 'true' branch, it will always do so... libxml2-2.12.10/hash.c:1012:12: branch_true: ...to here libxml2-2.12.10/hash.c:1012:12: branch_true: when 'end <= entry': always following 'true' branch... libxml2-2.12.10/hash.c:1012:12: branch_true: ...to here # 1009| entry = hash->table; # 1010| end = &hash->table[hash->size]; # 1011|-> while (entry->hashValue != 0) { # 1012| if (++entry >= end) # 1013| entry = hash->table; Error: GCC_ANALYZER_WARNING (CWE-775): [#def15] libxml2-2.12.10/nanoftp.c:882:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*(struct xmlNanoFTPCtxt *)ctx.controlFd' libxml2-2.12.10/nanoftp.c:1865:1: enter_function: entry to 'xmlNanoFTPOpen' libxml2-2.12.10/nanoftp.c:1870:8: branch_false: following 'false' branch (when 'URL' is non-NULL)... libxml2-2.12.10/nanoftp.c:1871:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1871:8: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1873:32: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1873:32: call_function: calling 'xmlNanoFTPNewCtxt' from 'xmlNanoFTPOpen' libxml2-2.12.10/nanoftp.c:1873:32: return_function: returning to 'xmlNanoFTPOpen' from 'xmlNanoFTPNewCtxt' libxml2-2.12.10/nanoftp.c:1874:8: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1875:9: branch_false: ...to here libxml2-2.12.10/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.12.10/nanoftp.c:1368:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*(struct xmlNanoFTPCtxt *)ctx.dataFd' libxml2-2.12.10/nanoftp.c:1714:1: enter_function: entry to 'xmlNanoFTPGetSocket' libxml2-2.12.10/nanoftp.c:1718:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.12.10/nanoftp.c:1720:8: branch_false: ...to here libxml2-2.12.10/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.12.10/nanoftp.c:1382:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*(struct xmlNanoFTPCtxt *)ctx.dataFd' libxml2-2.12.10/nanoftp.c:1714:1: enter_function: entry to 'xmlNanoFTPGetSocket' libxml2-2.12.10/nanoftp.c:1718:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.12.10/nanoftp.c:1720:8: branch_false: ...to here libxml2-2.12.10/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.12.10/nanoftp.c:1389:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*(struct xmlNanoFTPCtxt *)ctx.dataFd' libxml2-2.12.10/nanoftp.c:1714:1: enter_function: entry to 'xmlNanoFTPGetSocket' libxml2-2.12.10/nanoftp.c:1718:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.12.10/nanoftp.c:1720:8: branch_false: ...to here libxml2-2.12.10/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.12.10/nanoftp.c:1397:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor libxml2-2.12.10/nanoftp.c:1714:1: enter_function: entry to 'xmlNanoFTPGetSocket' libxml2-2.12.10/nanoftp.c:1718:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.12.10/nanoftp.c:1720:8: branch_false: ...to here libxml2-2.12.10/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.12.10/nanoftp.c:1407:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor libxml2-2.12.10/nanoftp.c:1714:1: enter_function: entry to 'xmlNanoFTPGetSocket' libxml2-2.12.10/nanoftp.c:1718:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.12.10/nanoftp.c:1720:8: branch_false: ...to here libxml2-2.12.10/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.12.10/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: GCC_ANALYZER_WARNING (CWE-835): [#def22] libxml2-2.12.10/parserInternals.c:1101:20: warning[-Wanalyzer-infinite-loop]: infinite loop # 1099| # 1100| i += 8; # 1101|-> while (IS_BLANK_CH(out[i])) # 1102| i += 1; # 1103| if (out[i++] != '=') Error: CPPCHECK_WARNING (CWE-457): [#def23] libxml2-2.12.10/python/libxml.c:1522: error[uninitvar]: Uninitialized variable: *ptr # 1520| #if PY_MAJOR_VERSION >= 3 # 1521| /* Ensure the error string doesn't start at UTF8 continuation. */ # 1522|-> while (*ptr && (*ptr & 0xc0) == 0x80) # 1523| ptr++; # 1524| #endif Error: COMPILER_WARNING (CWE-681): [#def24] libxml2-2.12.10/python/libxml.c: scope_hint: In function 'libxml_xmlErrorFuncHandler' libxml2-2.12.10/python/libxml.c:1529:43: warning[-Wpointer-sign]: pointer targets in passing argument 1 of 'libxml_charPtrConstWrap' differ in signedness # 1529 | message = libxml_charPtrConstWrap(ptr); # | ^~~ # | | # | unsigned char * libxml2-2.12.10/python/libxml.c:29: included_from: Included from here. libxml2-2.12.10/python/libxml_wrap.h:258:48: note: expected 'const char *' but argument is of type 'unsigned char *' # 258 | PyObject * libxml_charPtrConstWrap(const char *str); # | ~~~~~~~~~~~~^~~ # 1527| PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt); # 1528| Py_XINCREF(libxml_xmlPythonErrorFuncCtxt); # 1529|-> message = libxml_charPtrConstWrap(ptr); # 1530| PyTuple_SetItem(list, 1, message); # 1531| result = PyObject_CallObject(libxml_xmlPythonErrorFuncHandler, list); Error: GCC_ANALYZER_WARNING (CWE-476): [#def25] libxml2-2.12.10/python/libxml.c:1673:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml.c:1669:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:1672:31: branch_false: ...to here libxml2-2.12.10/python/libxml.c:1672:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:1673:9: branch_false: ...to here libxml2-2.12.10/python/libxml.c:1673:9: danger: dereference of NULL 'ctxt' # 1671| return(NULL); # 1672| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 1673|-> if (ctxt->_private == NULL) { # 1674| pyCtxt = xmlMalloc(sizeof(xmlParserCtxtPyCtxt)); # 1675| if (pyCtxt == NULL) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def26] libxml2-2.12.10/python/libxml.c:1723:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml.c:1718:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:1721:31: branch_false: ...to here libxml2-2.12.10/python/libxml.c:1721:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:1722:17: branch_false: ...to here libxml2-2.12.10/python/libxml.c:1723:9: danger: dereference of NULL 'ctxt' # 1721| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 1722| py_retval = PyTuple_New(2); # 1723|-> if (ctxt->_private != NULL) { # 1724| pyCtxt = (xmlParserCtxtPyCtxtPtr)ctxt->_private; # 1725| Error: GCC_ANALYZER_WARNING (CWE-476): [#def27] libxml2-2.12.10/python/libxml.c:1881:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml.c:1845:1: enter_function: entry to 'libxml_xmlSetValidErrors' libxml2-2.12.10/python/libxml.c:1855:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:1859:12: branch_false: ...to here libxml2-2.12.10/python/libxml.c:1859:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:1860:14: branch_false: ...to here libxml2-2.12.10/python/libxml.c:1861:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:1865:5: branch_false: ...to here libxml2-2.12.10/python/libxml.c:1869:5: call_function: calling 'Py_XDECREF' from 'libxml_xmlSetValidErrors' libxml2-2.12.10/python/libxml.c:1869:5: return_function: returning to 'libxml_xmlSetValidErrors' from 'Py_XDECREF' libxml2-2.12.10/python/libxml.c:1881:5: danger: dereference of NULL 'ctxt' # 1879| pyCtxt->arg = pyobj_arg; # 1880| # 1881|-> ctxt->error = libxml_xmlValidCtxtErrorFuncHandler; # 1882| ctxt->warning = libxml_xmlValidCtxtWarningFuncHandler; # 1883| ctxt->userData = pyCtxt; Error: GCC_ANALYZER_WARNING (CWE-476): [#def28] libxml2-2.12.10/python/libxml.c:1900:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.12.10/python/libxml.c:1896:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:1898:29: branch_false: ...to here libxml2-2.12.10/python/libxml.c:1898:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:1900:5: branch_false: ...to here libxml2-2.12.10/python/libxml.c:1900:5: danger: dereference of NULL 'cur' # 1898| cur = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_cur); # 1899| # 1900|-> pyCtxt = (xmlValidCtxtPyCtxtPtr)(cur->userData); # 1901| if (pyCtxt != NULL) # 1902| { Error: GCC_ANALYZER_WARNING (CWE-476): [#def29] libxml2-2.12.10/python/libxml.c:2284:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.12.10/python/libxml.c:2280:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2282:11: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2282:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2284:13: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2284:13: danger: dereference of NULL 'cur' # 2282| cur = PyxmlNode_Get(obj); # 2283| # 2284|-> switch (cur->type) { # 2285| case XML_DOCUMENT_NODE: # 2286| case XML_HTML_DOCUMENT_NODE:{ Error: GCC_ANALYZER_WARNING (CWE-476): [#def30] libxml2-2.12.10/python/libxml.c:2324:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.12.10/python/libxml.c:2320:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2322:11: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2322:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2324:13: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2324:13: danger: dereference of NULL 'cur' # 2322| cur = PyxmlNode_Get(obj); # 2323| # 2324|-> switch (cur->type) { # 2325| case XML_DOCUMENT_NODE: # 2326| case XML_HTML_DOCUMENT_NODE: Error: GCC_ANALYZER_WARNING (CWE-476): [#def31] libxml2-2.12.10/python/libxml.c:2375:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.12.10/python/libxml.c:2371:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2373:11: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2373:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2375:13: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2375:13: danger: dereference of NULL 'cur' # 2373| cur = PyxmlNode_Get(obj); # 2374| # 2375|-> switch (cur->type) { # 2376| case XML_DOCUMENT_NODE: # 2377| case XML_HTML_DOCUMENT_NODE: Error: GCC_ANALYZER_WARNING (CWE-476): [#def32] libxml2-2.12.10/python/libxml.c:2412:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.12.10/python/libxml.c:2408:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2410:11: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2410:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2412:13: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2412:13: danger: dereference of NULL 'cur' # 2410| cur = PyxmlNode_Get(obj); # 2411| # 2412|-> switch (cur->type) { # 2413| case XML_DOCUMENT_NODE: # 2414| case XML_HTML_DOCUMENT_NODE: Error: GCC_ANALYZER_WARNING (CWE-476): [#def33] libxml2-2.12.10/python/libxml.c:2445:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.12.10/python/libxml.c:2441:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2443:11: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2443:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2445:13: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2445:13: danger: dereference of NULL 'cur' # 2443| cur = PyxmlNode_Get(obj); # 2444| # 2445|-> switch (cur->type) { # 2446| case XML_ELEMENT_NODE: # 2447| case XML_ENTITY_REF_NODE: Error: GCC_ANALYZER_WARNING (CWE-476): [#def34] libxml2-2.12.10/python/libxml.c:2481:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.12.10/python/libxml.c:2477:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2479:11: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2479:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2481:13: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2481:13: danger: dereference of NULL 'cur' # 2479| cur = PyxmlNode_Get(obj); # 2480| # 2481|-> switch (cur->type) { # 2482| case XML_ELEMENT_NODE: # 2483| case XML_ENTITY_REF_NODE: Error: GCC_ANALYZER_WARNING (CWE-476): [#def35] libxml2-2.12.10/python/libxml.c:2517:13: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cur' libxml2-2.12.10/python/libxml.c:2513:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2515:11: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2515:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2517:13: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2517:13: danger: dereference of NULL 'cur' # 2515| cur = PyxmlNode_Get(obj); # 2516| # 2517|-> switch (cur->type) { # 2518| case XML_DOCUMENT_NODE: # 2519| case XML_HTML_DOCUMENT_NODE: Error: GCC_ANALYZER_WARNING (CWE-476): [#def36] libxml2-2.12.10/python/libxml.c:2920:26: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml.c:2914:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2917:31: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2917:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml.c:2919:9: branch_false: ...to here libxml2-2.12.10/python/libxml.c:2919:8: branch_true: following 'true' branch... libxml2-2.12.10/python/libxml.c:2920:26: branch_true: ...to here libxml2-2.12.10/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.12.10/python/libxml2-py.c:2599:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'Error' libxml2-2.12.10/python/libxml2-py.c:2595:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:2597:27: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:2597:13: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:2599:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:2599:5: danger: dereference of NULL 'Error' # 2597| Error = (xmlErrorPtr) PyError_Get(pyobj_Error); # 2598| # 2599|-> c_retval = Error->code; # 2600| py_retval = libxml_intWrap((int) c_retval); # 2601| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def38] libxml2-2.12.10/python/libxml2-py.c:2615:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'Error' libxml2-2.12.10/python/libxml2-py.c:2611:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:2613:27: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:2613:13: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:2615:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:2615:5: danger: dereference of NULL 'Error' # 2613| Error = (xmlErrorPtr) PyError_Get(pyobj_Error); # 2614| # 2615|-> c_retval = Error->domain; # 2616| py_retval = libxml_intWrap((int) c_retval); # 2617| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def39] libxml2-2.12.10/python/libxml2-py.c:2631:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'Error' libxml2-2.12.10/python/libxml2-py.c:2627:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:2629:27: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:2629:13: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:2631:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:2631:5: danger: dereference of NULL 'Error' # 2629| Error = (xmlErrorPtr) PyError_Get(pyobj_Error); # 2630| # 2631|-> c_retval = Error->file; # 2632| py_retval = libxml_charPtrConstWrap((const char *) c_retval); # 2633| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def40] libxml2-2.12.10/python/libxml2-py.c:2647:16: warning[-Wanalyzer-null-dereference]: dereference of NULL 'Error' libxml2-2.12.10/python/libxml2-py.c:2643:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:2645:27: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:2645:13: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:2647:16: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:2647:16: danger: dereference of NULL 'Error' # 2645| Error = (xmlErrorPtr) PyError_Get(pyobj_Error); # 2646| # 2647|-> c_retval = Error->level; # 2648| py_retval = libxml_intWrap((int) c_retval); # 2649| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def41] libxml2-2.12.10/python/libxml2-py.c:2663:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'Error' libxml2-2.12.10/python/libxml2-py.c:2659:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:2661:27: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:2661:13: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:2663:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:2663:5: danger: dereference of NULL 'Error' # 2661| Error = (xmlErrorPtr) PyError_Get(pyobj_Error); # 2662| # 2663|-> c_retval = Error->line; # 2664| py_retval = libxml_intWrap((int) c_retval); # 2665| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def42] libxml2-2.12.10/python/libxml2-py.c:2679:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'Error' libxml2-2.12.10/python/libxml2-py.c:2675:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:2677:27: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:2677:13: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:2679:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:2679:5: danger: dereference of NULL 'Error' # 2677| Error = (xmlErrorPtr) PyError_Get(pyobj_Error); # 2678| # 2679|-> c_retval = Error->message; # 2680| py_retval = libxml_charPtrConstWrap((const char *) c_retval); # 2681| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def43] libxml2-2.12.10/python/libxml2-py.c:5827:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:5823:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:5825:31: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:5825:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:5827:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:5827:5: danger: dereference of NULL 'ctxt' # 5825| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 5826| # 5827|-> c_retval = ctxt->myDoc; # 5828| py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval); # 5829| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def44] libxml2-2.12.10/python/libxml2-py.c:5843:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:5839:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:5841:31: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:5841:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:5843:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:5843:5: danger: dereference of NULL 'ctxt' # 5841| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 5842| # 5843|-> c_retval = ctxt->valid; # 5844| py_retval = libxml_intWrap((int) c_retval); # 5845| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def45] libxml2-2.12.10/python/libxml2-py.c:5859:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:5855:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:5857:31: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:5857:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:5859:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:5859:5: danger: dereference of NULL 'ctxt' # 5857| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 5858| # 5859|-> c_retval = ctxt->wellFormed; # 5860| py_retval = libxml_intWrap((int) c_retval); # 5861| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def46] libxml2-2.12.10/python/libxml2-py.c:5966:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:5962:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:5964:31: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:5964:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:5966:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:5966:5: danger: dereference of NULL 'ctxt' # 5964| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 5965| # 5966|-> ctxt->linenumbers = linenumbers; # 5967| Py_INCREF(Py_None); # 5968| return(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def47] libxml2-2.12.10/python/libxml2-py.c:5981:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:5977:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:5979:31: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:5979:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:5981:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:5981:5: danger: dereference of NULL 'ctxt' # 5979| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 5980| # 5981|-> ctxt->loadsubset = loadsubset; # 5982| Py_INCREF(Py_None); # 5983| return(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def48] libxml2-2.12.10/python/libxml2-py.c:5996:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:5992:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:5994:31: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:5994:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:5996:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:5996:5: danger: dereference of NULL 'ctxt' # 5994| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 5995| # 5996|-> ctxt->pedantic = pedantic; # 5997| Py_INCREF(Py_None); # 5998| return(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def49] libxml2-2.12.10/python/libxml2-py.c:6011:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:6007:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:6009:31: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:6009:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:6011:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:6011:5: danger: dereference of NULL 'ctxt' # 6009| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 6010| # 6011|-> ctxt->replaceEntities = replaceEntities; # 6012| Py_INCREF(Py_None); # 6013| return(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def50] libxml2-2.12.10/python/libxml2-py.c:6026:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:6022:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:6024:31: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:6024:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:6026:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:6026:5: danger: dereference of NULL 'ctxt' # 6024| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt); # 6025| # 6026|-> ctxt->validate = validate; # 6027| Py_INCREF(Py_None); # 6028| return(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def51] libxml2-2.12.10/python/libxml2-py.c:12195:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12191:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12193:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12193:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12195:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12195:5: danger: dereference of NULL 'URI' #12193| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12194| #12195|-> c_retval = URI->authority; #12196| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #12197| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def52] libxml2-2.12.10/python/libxml2-py.c:12211:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12207:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12209:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12209:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12211:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12211:5: danger: dereference of NULL 'URI' #12209| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12210| #12211|-> c_retval = URI->fragment; #12212| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #12213| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def53] libxml2-2.12.10/python/libxml2-py.c:12227:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12223:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12225:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12225:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12227:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12227:5: danger: dereference of NULL 'URI' #12225| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12226| #12227|-> c_retval = URI->opaque; #12228| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #12229| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def54] libxml2-2.12.10/python/libxml2-py.c:12243:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12239:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12241:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12241:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12243:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12243:5: danger: dereference of NULL 'URI' #12241| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12242| #12243|-> c_retval = URI->path; #12244| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #12245| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def55] libxml2-2.12.10/python/libxml2-py.c:12259:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12255:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12257:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12257:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12259:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12259:5: danger: dereference of NULL 'URI' #12257| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12258| #12259|-> c_retval = URI->port; #12260| py_retval = libxml_intWrap((int) c_retval); #12261| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def56] libxml2-2.12.10/python/libxml2-py.c:12275:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12271:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12273:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12273:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12275:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12275:5: danger: dereference of NULL 'URI' #12273| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12274| #12275|-> c_retval = URI->query; #12276| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #12277| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def57] libxml2-2.12.10/python/libxml2-py.c:12291:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12287:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12289:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12289:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12291:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12291:5: danger: dereference of NULL 'URI' #12289| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12290| #12291|-> c_retval = URI->query_raw; #12292| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #12293| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def58] libxml2-2.12.10/python/libxml2-py.c:12307:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12303:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12305:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12305:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12307:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12307:5: danger: dereference of NULL 'URI' #12305| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12306| #12307|-> c_retval = URI->scheme; #12308| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #12309| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def59] libxml2-2.12.10/python/libxml2-py.c:12323:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12319:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12321:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12321:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12323:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12323:5: danger: dereference of NULL 'URI' #12321| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12322| #12323|-> c_retval = URI->server; #12324| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #12325| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def60] libxml2-2.12.10/python/libxml2-py.c:12339:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12335:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12337:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12337:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12339:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12339:5: danger: dereference of NULL 'URI' #12337| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12338| #12339|-> c_retval = URI->user; #12340| py_retval = libxml_charPtrConstWrap((const char *) c_retval); #12341| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def61] libxml2-2.12.10/python/libxml2-py.c:12354:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12350:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12352:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12352:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12354:9: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12354:9: danger: dereference of NULL 'URI' #12352| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12353| #12354|-> if (URI->authority != NULL) xmlFree(URI->authority); #12355| URI->authority = (char *)xmlStrdup((const xmlChar *)authority); #12356| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def62] libxml2-2.12.10/python/libxml2-py.c:12370:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12366:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12368:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12368:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12370:9: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12370:9: danger: dereference of NULL 'URI' #12368| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12369| #12370|-> if (URI->fragment != NULL) xmlFree(URI->fragment); #12371| URI->fragment = (char *)xmlStrdup((const xmlChar *)fragment); #12372| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def63] libxml2-2.12.10/python/libxml2-py.c:12386:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12382:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12384:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12384:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12386:9: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12386:9: danger: dereference of NULL 'URI' #12384| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12385| #12386|-> if (URI->opaque != NULL) xmlFree(URI->opaque); #12387| URI->opaque = (char *)xmlStrdup((const xmlChar *)opaque); #12388| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def64] libxml2-2.12.10/python/libxml2-py.c:12402:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12398:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12400:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12400:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12402:9: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12402:9: danger: dereference of NULL 'URI' #12400| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12401| #12402|-> if (URI->path != NULL) xmlFree(URI->path); #12403| URI->path = (char *)xmlStrdup((const xmlChar *)path); #12404| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def65] libxml2-2.12.10/python/libxml2-py.c:12418:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12414:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12416:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12416:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12418:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12418:5: danger: dereference of NULL 'URI' #12416| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12417| #12418|-> URI->port = port; #12419| Py_INCREF(Py_None); #12420| return(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def66] libxml2-2.12.10/python/libxml2-py.c:12433:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12429:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12431:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12431:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12433:9: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12433:9: danger: dereference of NULL 'URI' #12431| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12432| #12433|-> if (URI->query != NULL) xmlFree(URI->query); #12434| URI->query = (char *)xmlStrdup((const xmlChar *)query); #12435| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def67] libxml2-2.12.10/python/libxml2-py.c:12449:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12445:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12447:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12447:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12449:9: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12449:9: danger: dereference of NULL 'URI' #12447| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12448| #12449|-> if (URI->query_raw != NULL) xmlFree(URI->query_raw); #12450| URI->query_raw = (char *)xmlStrdup((const xmlChar *)query_raw); #12451| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def68] libxml2-2.12.10/python/libxml2-py.c:12465:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12461:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12463:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12463:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12465:9: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12465:9: danger: dereference of NULL 'URI' #12463| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12464| #12465|-> if (URI->scheme != NULL) xmlFree(URI->scheme); #12466| URI->scheme = (char *)xmlStrdup((const xmlChar *)scheme); #12467| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def69] libxml2-2.12.10/python/libxml2-py.c:12481:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12477:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12479:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12479:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12481:9: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12481:9: danger: dereference of NULL 'URI' #12479| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12480| #12481|-> if (URI->server != NULL) xmlFree(URI->server); #12482| URI->server = (char *)xmlStrdup((const xmlChar *)server); #12483| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def70] libxml2-2.12.10/python/libxml2-py.c:12497:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'URI' libxml2-2.12.10/python/libxml2-py.c:12493:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12495:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12495:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:12497:9: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:12497:9: danger: dereference of NULL 'URI' #12495| URI = (xmlURIPtr) PyURI_Get(pyobj_URI); #12496| #12497|-> if (URI->user != NULL) xmlFree(URI->user); #12498| URI->user = (char *)xmlStrdup((const xmlChar *)user); #12499| Py_INCREF(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def71] libxml2-2.12.10/python/libxml2-py.c:13729:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:13725:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:13727:33: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:13727:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:13729:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:13729:5: danger: dereference of NULL 'ctxt' #13727| ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt); #13728| #13729|-> c_retval = ctxt->doc; #13730| py_retval = libxml_xmlDocPtrWrap((xmlDocPtr) c_retval); #13731| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def72] libxml2-2.12.10/python/libxml2-py.c:13747:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:13743:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:13745:33: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:13745:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:13747:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:13747:5: danger: dereference of NULL 'ctxt' #13745| ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt); #13746| #13747|-> c_retval = ctxt->node; #13748| py_retval = libxml_xmlNodePtrWrap((xmlNodePtr) c_retval); #13749| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def73] libxml2-2.12.10/python/libxml2-py.c:13765:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:13761:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:13763:33: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:13763:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:13765:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:13765:5: danger: dereference of NULL 'ctxt' #13763| ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt); #13764| #13765|-> c_retval = ctxt->proximityPosition; #13766| py_retval = libxml_intWrap((int) c_retval); #13767| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def74] libxml2-2.12.10/python/libxml2-py.c:13783:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:13779:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:13781:33: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:13781:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:13783:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:13783:5: danger: dereference of NULL 'ctxt' #13781| ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt); #13782| #13783|-> c_retval = ctxt->contextSize; #13784| py_retval = libxml_intWrap((int) c_retval); #13785| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def75] libxml2-2.12.10/python/libxml2-py.c:13801:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:13797:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:13799:33: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:13799:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:13801:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:13801:5: danger: dereference of NULL 'ctxt' #13799| ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt); #13800| #13801|-> c_retval = ctxt->function; #13802| py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval); #13803| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def76] libxml2-2.12.10/python/libxml2-py.c:13819:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:13815:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:13817:33: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:13817:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:13819:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:13819:5: danger: dereference of NULL 'ctxt' #13817| ctxt = (xmlXPathContextPtr) PyxmlXPathContext_Get(pyobj_ctxt); #13818| #13819|-> c_retval = ctxt->functionURI; #13820| py_retval = libxml_xmlCharPtrConstWrap((const xmlChar *) c_retval); #13821| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def77] libxml2-2.12.10/python/libxml2-py.c:14607:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:14603:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:14605:39: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:14605:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:14607:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:14607:5: danger: dereference of NULL 'ctxt' #14605| ctxt = (xmlXPathParserContextPtr) PyxmlXPathParserContext_Get(pyobj_ctxt); #14606| #14607|-> c_retval = ctxt->context; #14608| py_retval = libxml_xmlXPathContextPtrWrap((xmlXPathContextPtr) c_retval); #14609| return(py_retval); Error: GCC_ANALYZER_WARNING (CWE-476): [#def78] libxml2-2.12.10/python/libxml2-py.c:14816:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:14811:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:14813:33: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:14813:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:14814:23: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:14814:11: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:14816:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:14816:5: danger: dereference of NULL 'ctxt' #14814| doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc); #14815| #14816|-> ctxt->doc = doc; #14817| Py_INCREF(Py_None); #14818| return(Py_None); Error: GCC_ANALYZER_WARNING (CWE-476): [#def79] libxml2-2.12.10/python/libxml2-py.c:14835:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctxt' libxml2-2.12.10/python/libxml2-py.c:14830:8: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:14832:33: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:14832:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:14833:25: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:14833:12: branch_false: following 'false' branch... libxml2-2.12.10/python/libxml2-py.c:14835:5: branch_false: ...to here libxml2-2.12.10/python/libxml2-py.c:14835:5: danger: dereference of NULL 'ctxt' #14833| node = (xmlNodePtr) PyxmlNode_Get(pyobj_node); #14834| #14835|-> ctxt->node = node; #14836| Py_INCREF(Py_None); #14837| return(Py_None); Error: CPPCHECK_WARNING (CWE-476): [#def80] libxml2-2.12.10/schematron.c:1028: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: let # 1026| # 1027| let = (xmlSchematronLetPtr) malloc(sizeof(xmlSchematronLet)); # 1028|-> let->name = name; # 1029| let->comp = var_comp; # 1030| let->next = NULL; Error: CPPCHECK_WARNING (CWE-476): [#def81] libxml2-2.12.10/schematron.c:1029: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: let # 1027| let = (xmlSchematronLetPtr) malloc(sizeof(xmlSchematronLet)); # 1028| let->name = name; # 1029|-> let->comp = var_comp; # 1030| let->next = NULL; # 1031| Error: CPPCHECK_WARNING (CWE-476): [#def82] libxml2-2.12.10/schematron.c:1030: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: let # 1028| let->name = name; # 1029| let->comp = var_comp; # 1030|-> let->next = NULL; # 1031| # 1032| /* add new let variable to the beginning of the list */ Error: CPPCHECK_WARNING (CWE-562): [#def83] libxml2-2.12.10/xmlIO.c:3738: error[returnDanglingLifetime]: Returning pointer to local variable 'dir' that will be invalid when returning. # 3736| } # 3737| } # 3738|-> return(ret); # 3739| #undef IS_XMLPGD_SEP # 3740| } Error: GCC_ANALYZER_WARNING (CWE-457): [#def84] libxml2-2.12.10/xmlcatalog.c:86:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&line_read’ libxml2-2.12.10/xmlcatalog.c:80:8: branch_false: following ‘false’ branch... libxml2-2.12.10/xmlcatalog.c:82:5: branch_false: ...to here libxml2-2.12.10/xmlcatalog.c:85:8: branch_true: following ‘true’ branch (when ‘ret’ is non-NULL)... libxml2-2.12.10/xmlcatalog.c:86:9: branch_true: ...to here libxml2-2.12.10/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.12.10/xmlmemory.c:195: error[memleak]: Memory leak: p # 193| TEST_POINT # 194| # 195|-> return(ret); # 196| } # 197| Error: CPPCHECK_WARNING (CWE-401): [#def86] libxml2-2.12.10/xmlmemory.c:260: error[memleak]: Memory leak: p # 258| TEST_POINT # 259| # 260|-> return(ret); # 261| } # 262| /** Error: GCC_ANALYZER_WARNING (CWE-476): [#def87] libxml2-2.12.10/xmlreader.c:1254:14: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' libxml2-2.12.10/xmlreader.c:1161:1: enter_function: entry to 'xmlTextReaderRead' libxml2-2.12.10/xmlreader.c:1172:8: branch_false: following 'false' branch... libxml2-2.12.10/xmlreader.c:1175:9: branch_false: ...to here libxml2-2.12.10/xmlreader.c:1175:8: branch_true: following 'true' branch... libxml2-2.12.10/xmlreader.c:1176:9: branch_true: ...to here libxml2-2.12.10/xmlreader.c:1181:19: call_function: calling 'xmlTextReaderPushData' from 'xmlTextReaderRead' libxml2-2.12.10/xmlreader.c:1181:19: return_function: returning to 'xmlTextReaderRead' from 'xmlTextReaderPushData' libxml2-2.12.10/xmlreader.c:1182:20: branch_false: following 'false' branch... libxml2-2.12.10/xmlreader.c:1187:19: branch_false: ...to here libxml2-2.12.10/xmlreader.c:1381:8: branch_true: following 'true' branch... libxml2-2.12.10/xmlreader.c:1381:9: branch_true: following 'true' branch... libxml2-2.12.10/xmlreader.c:1384:10: branch_true: ...to here libxml2-2.12.10/xmlreader.c:1381:9: branch_true: following 'true' branch... libxml2-2.12.10/xmlreader.c:1385:10: branch_true: ...to here libxml2-2.12.10/xmlreader.c:1381:9: branch_true: following 'true' branch... libxml2-2.12.10/xmlreader.c:1386:10: branch_true: ...to here libxml2-2.12.10/xmlreader.c:1397:13: call_function: calling 'xmlTextReaderExpand' from 'xmlTextReaderRead' libxml2-2.12.10/xmlreader.c:1397:13: return_function: returning to 'xmlTextReaderRead' from 'xmlTextReaderExpand' libxml2-2.12.10/xmlreader.c:1397:12: branch_false: following 'false' branch... libxml2-2.12.10/xmlreader.c:1399:9: branch_false: ...to here libxml2-2.12.10/xmlreader.c:1401:8: branch_true: following 'true' branch... libxml2-2.12.10/xmlreader.c:1217:8: branch_false: following 'false' branch... libxml2-2.12.10/xmlreader.c:1217:8: branch_false: ...to here libxml2-2.12.10/xmlreader.c:1229:12: branch_false: following 'false' branch... libxml2-2.12.10/xmlreader.c:1253:8: branch_false: ...to here libxml2-2.12.10/xmlreader.c:1253:8: branch_true: following 'true' branch (when 'oldstate != 4')... libxml2-2.12.10/xmlreader.c:1254:14: branch_true: ...to here libxml2-2.12.10/xmlreader.c:1254:14: danger: dereference of NULL '<unknown>' # 1252| } # 1253| if (oldstate != XML_TEXTREADER_BACKTRACK) { # 1254|-> if ((reader->node->children != NULL) && # 1255| (reader->node->type != XML_ENTITY_REF_NODE) && # 1256| (reader->node->type != XML_XINCLUDE_START) && Error: GCC_ANALYZER_WARNING (CWE-476): [#def88] libxml2-2.12.10/xmlreader.c:1264:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' libxml2-2.12.10/xmlreader.c:1161:1: enter_function: entry to 'xmlTextReaderRead' libxml2-2.12.10/xmlreader.c:1172:8: branch_false: following 'false' branch... libxml2-2.12.10/xmlreader.c:1175:9: branch_false: ...to here libxml2-2.12.10/xmlreader.c:1175:8: branch_false: following 'false' branch... libxml2-2.12.10/xmlreader.c:1212:5: branch_false: ...to here libxml2-2.12.10/xmlreader.c:1217:8: branch_false: following 'false' branch... libxml2-2.12.10/xmlreader.c:1217:8: branch_false: ...to here libxml2-2.12.10/xmlreader.c:1229:12: branch_true: following 'true' branch... libxml2-2.12.10/xmlreader.c:1229:39: branch_true: ...to here libxml2-2.12.10/xmlreader.c:1229:12: branch_true: following 'true' branch... libxml2-2.12.10/xmlreader.c:1230:13: branch_true: ...to here libxml2-2.12.10/xmlreader.c:1229:12: branch_true: following 'true' branch... libxml2-2.12.10/xmlreader.c:1229:12: branch_true: ...to here libxml2-2.12.10/xmlreader.c:1229:12: branch_true: following 'true' branch (when 'oldstate == 4')... libxml2-2.12.10/xmlreader.c:1240:14: branch_true: ...to here libxml2-2.12.10/xmlreader.c:1229:12: branch_true: following 'true' branch... libxml2-2.12.10/xmlreader.c:1243:13: branch_true: ...to here libxml2-2.12.10/xmlreader.c:1229:12: branch_true: following 'true' branch... libxml2-2.12.10/xmlreader.c:1244:15: branch_true: ...to here libxml2-2.12.10/xmlreader.c:1244:15: call_function: calling 'xmlTextReaderPushData' from 'xmlTextReaderRead' libxml2-2.12.10/xmlreader.c:1244:15: return_function: returning to 'xmlTextReaderRead' from 'xmlTextReaderPushData' libxml2-2.12.10/xmlreader.c:1245:12: branch_false: following 'false' branch... libxml2-2.12.10/xmlreader.c:1250:13: branch_false: ...to here libxml2-2.12.10/xmlreader.c:1250:12: branch_false: following 'false' branch... libxml2-2.12.10/xmlreader.c:1250:12: branch_false: ...to here libxml2-2.12.10/xmlreader.c:1229:12: branch_false: following 'false' branch... libxml2-2.12.10/xmlreader.c:1253:8: branch_false: ...to here libxml2-2.12.10/xmlreader.c:1253:8: branch_false: following 'false' branch (when 'oldstate == 4')... libxml2-2.12.10/xmlreader.c:1264:9: branch_false: ...to here libxml2-2.12.10/xmlreader.c:1264:9: danger: dereference of NULL '<unknown>' # 1262| } # 1263| } # 1264|-> if (reader->node->next != NULL) { # 1265| if ((oldstate == XML_TEXTREADER_ELEMENT) && # 1266| (reader->node->type == XML_ELEMENT_NODE) && Error: COMPILER_WARNING (CWE-457): [#def89] libxml2-2.12.10/xmlschemas.c: scope_hint: In function 'xmlSchemaErr4Line' libxml2-2.12.10/xmlschemas.c:2156:30: warning[-Wmaybe-uninitialized]: 'f' may be used uninitialized # 2156 | file = f; # | ~~~~~^~~ libxml2-2.12.10/xmlschemas.c:2153:33: note: 'f' declared here # 2153 | const char *f; # | ^ # 2154| vctxt->locFunc(vctxt->locCtxt, &f, &l); # 2155| if (file == NULL) # 2156|-> file = f; # 2157| if (line == 0) # 2158| line = (int) l; Error: CPPCHECK_WARNING (CWE-758): [#def90] libxml2-2.12.10/xmlschemas.c:27797: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour #27795| */ #27796| for (i = 1; i < (int) sizeof(int) * 8; i++) { #27797|-> if (options & 1<<i) #27798| return (-1); #27799| }
| 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.12.10-6.fc44 |
| store-results-to | /tmp/tmpc48xidzu/libxml2-2.12.10-6.fc44.tar.xz |
| time-created | 2026-08-03 18:08:44 |
| time-finished | 2026-08-03 18:13:28 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpc48xidzu/libxml2-2.12.10-6.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpc48xidzu/libxml2-2.12.10-6.fc44.src.rpm' |
| tool-version | csmock-3.8.7.20260803.142340.gb75b18e-1.el9 |