libxml2-2.12.6-1.fc41
List of Defects
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: CLANG_WARNING: [#def2]
libxml2-2.12.6/SAX2.c:1107:6: warning[core.NullDereference]: Array access (from variable 'val') results in a null pointer dereference
# 1105| }
# 1106|
# 1107|-> if (val[0] != 0) {
# 1108| xmlURIPtr uri;
# 1109|
Error: CLANG_WARNING: [#def3]
libxml2-2.12.6/SAX2.c:1173:6: warning[core.NullDereference]: Array access (from variable 'val') results in a null pointer dereference
# 1171| }
# 1172|
# 1173|-> if (val[0] == 0) {
# 1174| xmlNsErrMsg(ctxt, XML_NS_ERR_EMPTY,
# 1175| "Empty namespace name for prefix %s\n", name, NULL);
Error: CLANG_WARNING: [#def4]
libxml2-2.12.6/debugXML.c:285:9: warning[core.NullDereference]: Access to field 'dict' results in a dereference of a null pointer (loaded from variable 'doc')
# 283| dict = NULL;
# 284| } else {
# 285|-> dict = doc->dict;
# 286| if ((dict == NULL) && (ctxt->nodict == 0)) {
# 287| #if 0
Error: CLANG_WARNING: [#def5]
libxml2-2.12.6/dict.c:777:9: warning[core.NullDereference]: Access to field 'hashValue' results in a dereference of a null pointer (loaded from variable 'entry')
# 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-476): [#def6]
libxml2-2.12.6/dict.c: scope_hint: In function ‘xmlDictLookupInternal’
libxml2-2.12.6/dict.c:777:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘entry’
# 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): [#def7]
libxml2-2.12.6/encoding.c: scope_hint: In function ‘xmlFindCharEncodingHandler’
libxml2-2.12.6/encoding.c:1692:29: warning[-Wanalyzer-malloc-leak]: leak of ‘icv_in’
libxml2-2.12.6/encoding.c:28: included_from: Included from here.
# 1690| int i;
# 1691|
# 1692|-> if (name == NULL) return(NULL);
# 1693| if (name[0] == 0) return(NULL);
# 1694|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
libxml2-2.12.6/encoding.c: scope_hint: In function ‘xmlFindCharEncodingHandler’
libxml2-2.12.6/encoding.c:1729:8: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open("UTF-8", name)’
libxml2-2.12.6/encoding.c:28: included_from: Included from here.
# 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): [#def9]
libxml2-2.12.6/encoding.c:1732:8: warning[-Wanalyzer-malloc-leak]: leak of ‘iconv_open(name, "UTF-8")’
# 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-476): [#def10]
libxml2-2.12.6/hash.c: scope_hint: In function ‘xmlHashUpdateInternal’
libxml2-2.12.6/hash.c:556:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘entry’
# 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-775): [#def11]
libxml2-2.12.6/nanoftp.c: scope_hint: In function ‘xmlNanoFTPConnect’
libxml2-2.12.6/nanoftp.c:882:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*(struct xmlNanoFTPCtxt *)ctx.controlFd’
# 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): [#def12]
libxml2-2.12.6/nanoftp.c: scope_hint: In function ‘xmlNanoFTPGetConnection’
libxml2-2.12.6/nanoftp.c:1368:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*(struct xmlNanoFTPCtxt *)ctx.dataFd’
libxml2-2.12.6/nanoftp.c:1332:17: note: in expansion of macro ‘closesocket’
# 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): [#def13]
libxml2-2.12.6/nanoftp.c:1382:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*(struct xmlNanoFTPCtxt *)ctx.dataFd’
# 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): [#def14]
libxml2-2.12.6/nanoftp.c:1389:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*(struct xmlNanoFTPCtxt *)ctx.dataFd’
# 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): [#def15]
libxml2-2.12.6/nanoftp.c:1397:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*(void *)ctx.dataFd’
# 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): [#def16]
libxml2-2.12.6/nanoftp.c:1407:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*(void *)ctx.dataFd’
# 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): [#def17]
libxml2-2.12.6/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-562): [#def18]
libxml2-2.12.6/nanohttp.c:641: error[returnDanglingLifetime]: Returning pointer to local variable 'buf' that will be invalid when returning.
# 639| if (*bp == '\n') {
# 640| *bp = 0;
# 641|-> return(xmlMemStrdup(buf));
# 642| }
# 643| if (*bp != '\r')
Error: CPPCHECK_WARNING (CWE-562): [#def19]
libxml2-2.12.6/nanohttp.c:647: error[returnDanglingLifetime]: Returning pointer to local variable 'buf' that will be invalid when returning.
# 645| }
# 646| buf[4095] = 0;
# 647|-> return(xmlMemStrdup(buf));
# 648| }
# 649|
Error: GCC_ANALYZER_WARNING (CWE-835): [#def20]
libxml2-2.12.6/include/libxml/parserInternals.h:18: included_from: Included from here.
libxml2-2.12.6/parserInternals.c:26: included_from: Included from here.
libxml2-2.12.6/parserInternals.c: scope_hint: In function ‘xmlDetectEBCDIC’
libxml2-2.12.6/parserInternals.c:1105:35: warning[-Wanalyzer-infinite-loop]: infinite loop
libxml2-2.12.6/include/libxml/chvalid.h:88:36: note: in definition of macro ‘xmlIsBlank_ch’
libxml2-2.12.6/parserInternals.c:1105:20: note: in expansion of macro ‘IS_BLANK_CH’
libxml2-2.12.6/include/libxml/chvalid.h:88:36: note: in definition of macro ‘xmlIsBlank_ch’
libxml2-2.12.6/parserInternals.c:1105:20: note: in expansion of macro ‘IS_BLANK_CH’
libxml2-2.12.6/include/libxml/chvalid.h:88:36: note: in definition of macro ‘xmlIsBlank_ch’
libxml2-2.12.6/parserInternals.c:1105:20: note: in expansion of macro ‘IS_BLANK_CH’
# 1103| if (out[i++] != '=')
# 1104| break;
# 1105|-> while (IS_BLANK_CH(out[i]))
# 1106| i += 1;
# 1107| quote = out[i++];
Error: GCC_ANALYZER_WARNING (CWE-835): [#def21]
libxml2-2.12.6/parserInternals.c:1112:34: warning[-Wanalyzer-infinite-loop]: infinite loop
# 1110| start = i;
# 1111| cur = out[i];
# 1112|-> while (((cur >= 'a') && (cur <= 'z')) ||
# 1113| ((cur >= 'A') && (cur <= 'Z')) ||
# 1114| ((cur >= '0') && (cur <= '9')) ||
Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
libxml2-2.12.6/pattern.c: scope_hint: In function ‘xmlPatMatch’
libxml2-2.12.6/pattern.c:515:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’
# 513| goto rollback;
# 514| node = node->parent;
# 515|-> if ((node->type == XML_DOCUMENT_NODE) ||
# 516| (node->type == XML_HTML_DOCUMENT_NODE))
# 517| continue;
Error: CPPCHECK_WARNING (CWE-457): [#def23]
libxml2-2.12.6/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.6/python/libxml.c: scope_hint: In function ‘libxml_xmlErrorFuncHandler’
libxml2-2.12.6/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.6/python/libxml.c:29: included_from: Included from here.
libxml2-2.12.6/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: CLANG_WARNING: [#def25]
libxml2-2.12.6/python/libxml.c:1673:9: warning[core.NullDereference]: Access to field '_private' results in a dereference of a null pointer (loaded from variable '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.6/python/libxml.c: scope_hint: In function ‘libxml_xmlParserCtxtSetErrorHandler’
libxml2-2.12.6/python/libxml.c:1673:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml.c:29: included_from: Included from here.
libxml2-2.12.6/python/libxml.c:1672:31: note: in expansion of macro ‘PyparserCtxt_Get’
# 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: CLANG_WARNING: [#def27]
libxml2-2.12.6/python/libxml.c:1723:9: warning[core.NullDereference]: Access to field '_private' results in a dereference of a null pointer (loaded from variable '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): [#def28]
libxml2-2.12.6/python/libxml.c: scope_hint: In function ‘libxml_xmlParserCtxtGetErrorHandler’
libxml2-2.12.6/python/libxml.c:1723:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml.c:1721:31: note: in expansion of macro ‘PyparserCtxt_Get’
# 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): [#def29]
libxml2-2.12.6/python/libxml.c: scope_hint: In function ‘libxml_xmlSetValidErrors’
libxml2-2.12.6/python/libxml.c:1881:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml.c:1859:12: note: in expansion of macro ‘PyValidCtxt_Get’
libxml2-2.12.6/python/libxml.c:1859:12: note: in expansion of macro ‘PyValidCtxt_Get’
/usr/include/python3.12/Python.h:44: included_from: Included from here.
libxml2-2.12.6/python/libxml.c:15: included_from: Included from here.
libxml2-2.12.6/python/libxml.c:1869:5: note: in expansion of macro ‘Py_XDECREF’
libxml2-2.12.6/python/libxml.c:1869:5: note: in expansion of macro ‘Py_XDECREF’
# 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): [#def30]
libxml2-2.12.6/python/libxml.c: scope_hint: In function ‘libxml_xmlFreeValidCtxt’
libxml2-2.12.6/python/libxml.c:1900:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml.c:1898:29: note: in expansion of macro ‘PyValidCtxt_Get’
# 1898| cur = (xmlValidCtxtPtr) PyValidCtxt_Get(pyobj_cur);
# 1899|
# 1900|-> pyCtxt = (xmlValidCtxtPyCtxtPtr)(cur->userData);
# 1901| if (pyCtxt != NULL)
# 1902| {
Error: CLANG_WARNING: [#def31]
libxml2-2.12.6/python/libxml.c:1900:37: warning[core.NullDereference]: Access to field 'userData' results in a dereference of a null pointer (loaded from variable '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): [#def32]
libxml2-2.12.6/python/libxml.c: scope_hint: In function ‘libxml_name’
libxml2-2.12.6/python/libxml.c:2284:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml.c:2282:11: note: in expansion of macro ‘PyxmlNode_Get’
libxml2-2.12.6/python/libxml.c:2282:11: note: in expansion of macro ‘PyxmlNode_Get’
# 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): [#def33]
libxml2-2.12.6/python/libxml.c: scope_hint: In function ‘libxml_doc’
libxml2-2.12.6/python/libxml.c:2324:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml.c:2322:11: note: in expansion of macro ‘PyxmlNode_Get’
libxml2-2.12.6/python/libxml.c:2322:11: note: in expansion of macro ‘PyxmlNode_Get’
# 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): [#def34]
libxml2-2.12.6/python/libxml.c: scope_hint: In function ‘libxml_next’
libxml2-2.12.6/python/libxml.c:2375:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml.c:2373:11: note: in expansion of macro ‘PyxmlNode_Get’
libxml2-2.12.6/python/libxml.c:2373:11: note: in expansion of macro ‘PyxmlNode_Get’
# 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): [#def35]
libxml2-2.12.6/python/libxml.c: scope_hint: In function ‘libxml_prev’
libxml2-2.12.6/python/libxml.c:2412:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml.c:2410:11: note: in expansion of macro ‘PyxmlNode_Get’
libxml2-2.12.6/python/libxml.c:2410:11: note: in expansion of macro ‘PyxmlNode_Get’
# 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): [#def36]
libxml2-2.12.6/python/libxml.c: scope_hint: In function ‘libxml_children’
libxml2-2.12.6/python/libxml.c:2445:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml.c:2443:11: note: in expansion of macro ‘PyxmlNode_Get’
libxml2-2.12.6/python/libxml.c:2443:11: note: in expansion of macro ‘PyxmlNode_Get’
# 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): [#def37]
libxml2-2.12.6/python/libxml.c: scope_hint: In function ‘libxml_last’
libxml2-2.12.6/python/libxml.c:2481:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml.c:2479:11: note: in expansion of macro ‘PyxmlNode_Get’
libxml2-2.12.6/python/libxml.c:2479:11: note: in expansion of macro ‘PyxmlNode_Get’
# 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): [#def38]
libxml2-2.12.6/python/libxml.c: scope_hint: In function ‘libxml_parent’
libxml2-2.12.6/python/libxml.c:2517:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml.c:2515:11: note: in expansion of macro ‘PyxmlNode_Get’
libxml2-2.12.6/python/libxml.c:2515:11: note: in expansion of macro ‘PyxmlNode_Get’
# 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): [#def39]
libxml2-2.12.6/python/libxml.c: scope_hint: In function ‘libxml_addLocalCatalog’
libxml2-2.12.6/python/libxml.c:2920:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml.c:2917:31: note: in expansion of macro ‘PyparserCtxt_Get’
# 2918|
# 2919| if (URL != NULL) {
# 2920|-> ctxt->catalogs = xmlCatalogAddLocal(ctxt->catalogs, URL);
# 2921| }
# 2922|
Error: CLANG_WARNING: [#def40]
libxml2-2.12.6/python/libxml.c:2920:38: warning[core.NullDereference]: Access to field 'catalogs' results in a dereference of a null pointer (loaded from variable 'ctxt')
# 2918|
# 2919| if (URL != NULL) {
# 2920|-> ctxt->catalogs = xmlCatalogAddLocal(ctxt->catalogs, URL);
# 2921| }
# 2922|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def41]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlErrorGetCode’
libxml2-2.12.6/python/libxml2-py.c:2599:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:8: included_from: Included from here.
libxml2-2.12.6/python/libxml2-py.c:2597:27: note: in expansion of macro ‘PyError_Get’
# 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: CLANG_WARNING: [#def42]
libxml2-2.12.6/python/libxml2-py.c:2599:16: warning[core.NullDereference]: Access to field 'code' results in a dereference of a null pointer (loaded from variable '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): [#def43]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlErrorGetDomain’
libxml2-2.12.6/python/libxml2-py.c:2615:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:2613:27: note: in expansion of macro ‘PyError_Get’
# 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: CLANG_WARNING: [#def44]
libxml2-2.12.6/python/libxml2-py.c:2615:16: warning[core.NullDereference]: Access to field 'domain' results in a dereference of a null pointer (loaded from variable '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): [#def45]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlErrorGetFile’
libxml2-2.12.6/python/libxml2-py.c:2631:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:2629:27: note: in expansion of macro ‘PyError_Get’
# 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: CLANG_WARNING: [#def46]
libxml2-2.12.6/python/libxml2-py.c:2631:16: warning[core.NullDereference]: Access to field 'file' results in a dereference of a null pointer (loaded from variable '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: CLANG_WARNING: [#def47]
libxml2-2.12.6/python/libxml2-py.c:2647:16: warning[core.NullDereference]: Access to field 'level' results in a dereference of a null pointer (loaded from variable '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): [#def48]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlErrorGetLevel’
libxml2-2.12.6/python/libxml2-py.c:2647:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:2645:27: note: in expansion of macro ‘PyError_Get’
# 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): [#def49]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlErrorGetLine’
libxml2-2.12.6/python/libxml2-py.c:2663:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:2661:27: note: in expansion of macro ‘PyError_Get’
# 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: CLANG_WARNING: [#def50]
libxml2-2.12.6/python/libxml2-py.c:2663:16: warning[core.NullDereference]: Access to field 'line' results in a dereference of a null pointer (loaded from variable '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): [#def51]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlErrorGetMessage’
libxml2-2.12.6/python/libxml2-py.c:2679:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:2677:27: note: in expansion of macro ‘PyError_Get’
# 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: CLANG_WARNING: [#def52]
libxml2-2.12.6/python/libxml2-py.c:2679:16: warning[core.NullDereference]: Access to field 'message' results in a dereference of a null pointer (loaded from variable '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): [#def53]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlParserGetDoc’
libxml2-2.12.6/python/libxml2-py.c:5827:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:5825:31: note: in expansion of macro ‘PyparserCtxt_Get’
# 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: CLANG_WARNING: [#def54]
libxml2-2.12.6/python/libxml2-py.c:5827:16: warning[core.NullDereference]: Access to field 'myDoc' results in a dereference of a null pointer (loaded from variable '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): [#def55]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlParserGetIsValid’
libxml2-2.12.6/python/libxml2-py.c:5843:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:5841:31: note: in expansion of macro ‘PyparserCtxt_Get’
# 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: CLANG_WARNING: [#def56]
libxml2-2.12.6/python/libxml2-py.c:5843:16: warning[core.NullDereference]: Access to field 'valid' results in a dereference of a null pointer (loaded from variable '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): [#def57]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlParserGetWellFormed’
libxml2-2.12.6/python/libxml2-py.c:5859:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:5857:31: note: in expansion of macro ‘PyparserCtxt_Get’
# 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: CLANG_WARNING: [#def58]
libxml2-2.12.6/python/libxml2-py.c:5859:16: warning[core.NullDereference]: Access to field 'wellFormed' results in a dereference of a null pointer (loaded from variable '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): [#def59]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlParserSetLineNumbers’
libxml2-2.12.6/python/libxml2-py.c:5966:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:5964:31: note: in expansion of macro ‘PyparserCtxt_Get’
# 5964| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
# 5965|
# 5966|-> ctxt->linenumbers = linenumbers;
# 5967| Py_INCREF(Py_None);
# 5968| return(Py_None);
Error: CLANG_WARNING: [#def60]
libxml2-2.12.6/python/libxml2-py.c:5966:23: warning[core.NullDereference]: Access to field 'linenumbers' results in a dereference of a null pointer (loaded from variable '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): [#def61]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlParserSetLoadSubset’
libxml2-2.12.6/python/libxml2-py.c:5981:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:5979:31: note: in expansion of macro ‘PyparserCtxt_Get’
# 5979| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
# 5980|
# 5981|-> ctxt->loadsubset = loadsubset;
# 5982| Py_INCREF(Py_None);
# 5983| return(Py_None);
Error: CLANG_WARNING: [#def62]
libxml2-2.12.6/python/libxml2-py.c:5981:22: warning[core.NullDereference]: Access to field 'loadsubset' results in a dereference of a null pointer (loaded from variable '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): [#def63]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlParserSetPedantic’
libxml2-2.12.6/python/libxml2-py.c:5996:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:5994:31: note: in expansion of macro ‘PyparserCtxt_Get’
# 5994| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
# 5995|
# 5996|-> ctxt->pedantic = pedantic;
# 5997| Py_INCREF(Py_None);
# 5998| return(Py_None);
Error: CLANG_WARNING: [#def64]
libxml2-2.12.6/python/libxml2-py.c:5996:20: warning[core.NullDereference]: Access to field 'pedantic' results in a dereference of a null pointer (loaded from variable '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): [#def65]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlParserSetReplaceEntities’
libxml2-2.12.6/python/libxml2-py.c:6011:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:6009:31: note: in expansion of macro ‘PyparserCtxt_Get’
# 6009| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
# 6010|
# 6011|-> ctxt->replaceEntities = replaceEntities;
# 6012| Py_INCREF(Py_None);
# 6013| return(Py_None);
Error: CLANG_WARNING: [#def66]
libxml2-2.12.6/python/libxml2-py.c:6011:27: warning[core.NullDereference]: Access to field 'replaceEntities' results in a dereference of a null pointer (loaded from variable '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): [#def67]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlParserSetValidate’
libxml2-2.12.6/python/libxml2-py.c:6026:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:6024:31: note: in expansion of macro ‘PyparserCtxt_Get’
# 6024| ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
# 6025|
# 6026|-> ctxt->validate = validate;
# 6027| Py_INCREF(Py_None);
# 6028| return(Py_None);
Error: CLANG_WARNING: [#def68]
libxml2-2.12.6/python/libxml2-py.c:6026:20: warning[core.NullDereference]: Access to field 'validate' results in a dereference of a null pointer (loaded from variable '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): [#def69]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURIGetAuthority’
libxml2-2.12.6/python/libxml2-py.c:12195:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12193:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def70]
libxml2-2.12.6/python/libxml2-py.c:12195:16: warning[core.NullDereference]: Access to field 'authority' results in a dereference of a null pointer (loaded from variable '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): [#def71]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURIGetFragment’
libxml2-2.12.6/python/libxml2-py.c:12211:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12209:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def72]
libxml2-2.12.6/python/libxml2-py.c:12211:16: warning[core.NullDereference]: Access to field 'fragment' results in a dereference of a null pointer (loaded from variable '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): [#def73]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURIGetOpaque’
libxml2-2.12.6/python/libxml2-py.c:12227:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12225:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def74]
libxml2-2.12.6/python/libxml2-py.c:12227:16: warning[core.NullDereference]: Access to field 'opaque' results in a dereference of a null pointer (loaded from variable '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): [#def75]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURIGetPath’
libxml2-2.12.6/python/libxml2-py.c:12243:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12241:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def76]
libxml2-2.12.6/python/libxml2-py.c:12243:16: warning[core.NullDereference]: Access to field 'path' results in a dereference of a null pointer (loaded from variable '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): [#def77]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURIGetPort’
libxml2-2.12.6/python/libxml2-py.c:12259:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12257:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def78]
libxml2-2.12.6/python/libxml2-py.c:12259:16: warning[core.NullDereference]: Access to field 'port' results in a dereference of a null pointer (loaded from variable '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): [#def79]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURIGetQuery’
libxml2-2.12.6/python/libxml2-py.c:12275:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12273:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def80]
libxml2-2.12.6/python/libxml2-py.c:12275:16: warning[core.NullDereference]: Access to field 'query' results in a dereference of a null pointer (loaded from variable '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): [#def81]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURIGetQueryRaw’
libxml2-2.12.6/python/libxml2-py.c:12291:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12289:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def82]
libxml2-2.12.6/python/libxml2-py.c:12291:16: warning[core.NullDereference]: Access to field 'query_raw' results in a dereference of a null pointer (loaded from variable '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): [#def83]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURIGetScheme’
libxml2-2.12.6/python/libxml2-py.c:12307:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12305:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def84]
libxml2-2.12.6/python/libxml2-py.c:12307:16: warning[core.NullDereference]: Access to field 'scheme' results in a dereference of a null pointer (loaded from variable '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): [#def85]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURIGetServer’
libxml2-2.12.6/python/libxml2-py.c:12323:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12321:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def86]
libxml2-2.12.6/python/libxml2-py.c:12323:16: warning[core.NullDereference]: Access to field 'server' results in a dereference of a null pointer (loaded from variable '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): [#def87]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURIGetUser’
libxml2-2.12.6/python/libxml2-py.c:12339:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12337:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def88]
libxml2-2.12.6/python/libxml2-py.c:12339:16: warning[core.NullDereference]: Access to field 'user' results in a dereference of a null pointer (loaded from variable '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: CLANG_WARNING: [#def89]
libxml2-2.12.6/python/libxml2-py.c:12354:9: warning[core.NullDereference]: Access to field 'authority' results in a dereference of a null pointer (loaded from variable '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): [#def90]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURISetAuthority’
libxml2-2.12.6/python/libxml2-py.c:12354:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12352:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def91]
libxml2-2.12.6/python/libxml2-py.c:12370:9: warning[core.NullDereference]: Access to field 'fragment' results in a dereference of a null pointer (loaded from variable '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): [#def92]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURISetFragment’
libxml2-2.12.6/python/libxml2-py.c:12370:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12368:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def93]
libxml2-2.12.6/python/libxml2-py.c:12386:9: warning[core.NullDereference]: Access to field 'opaque' results in a dereference of a null pointer (loaded from variable '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): [#def94]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURISetOpaque’
libxml2-2.12.6/python/libxml2-py.c:12386:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12384:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def95]
libxml2-2.12.6/python/libxml2-py.c:12402:9: warning[core.NullDereference]: Access to field 'path' results in a dereference of a null pointer (loaded from variable '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): [#def96]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURISetPath’
libxml2-2.12.6/python/libxml2-py.c:12402:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12400:23: note: in expansion of macro ‘PyURI_Get’
#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): [#def97]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURISetPort’
libxml2-2.12.6/python/libxml2-py.c:12418:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12416:23: note: in expansion of macro ‘PyURI_Get’
#12416| URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
#12417|
#12418|-> URI->port = port;
#12419| Py_INCREF(Py_None);
#12420| return(Py_None);
Error: CLANG_WARNING: [#def98]
libxml2-2.12.6/python/libxml2-py.c:12418:15: warning[core.NullDereference]: Access to field 'port' results in a dereference of a null pointer (loaded from variable 'URI')
#12416| URI = (xmlURIPtr) PyURI_Get(pyobj_URI);
#12417|
#12418|-> URI->port = port;
#12419| Py_INCREF(Py_None);
#12420| return(Py_None);
Error: CLANG_WARNING: [#def99]
libxml2-2.12.6/python/libxml2-py.c:12433:9: warning[core.NullDereference]: Access to field 'query' results in a dereference of a null pointer (loaded from variable '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): [#def100]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURISetQuery’
libxml2-2.12.6/python/libxml2-py.c:12433:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12431:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def101]
libxml2-2.12.6/python/libxml2-py.c:12449:9: warning[core.NullDereference]: Access to field 'query_raw' results in a dereference of a null pointer (loaded from variable '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): [#def102]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURISetQueryRaw’
libxml2-2.12.6/python/libxml2-py.c:12449:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12447:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def103]
libxml2-2.12.6/python/libxml2-py.c:12465:9: warning[core.NullDereference]: Access to field 'scheme' results in a dereference of a null pointer (loaded from variable '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): [#def104]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURISetScheme’
libxml2-2.12.6/python/libxml2-py.c:12465:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12463:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def105]
libxml2-2.12.6/python/libxml2-py.c:12481:9: warning[core.NullDereference]: Access to field 'server' results in a dereference of a null pointer (loaded from variable '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): [#def106]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURISetServer’
libxml2-2.12.6/python/libxml2-py.c:12481:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12479:23: note: in expansion of macro ‘PyURI_Get’
#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: CLANG_WARNING: [#def107]
libxml2-2.12.6/python/libxml2-py.c:12497:9: warning[core.NullDereference]: Access to field 'user' results in a dereference of a null pointer (loaded from variable '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): [#def108]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlURISetUser’
libxml2-2.12.6/python/libxml2-py.c:12497:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:12495:23: note: in expansion of macro ‘PyURI_Get’
#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): [#def109]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlXPathGetContextDoc’
libxml2-2.12.6/python/libxml2-py.c:13729:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:13727:33: note: in expansion of macro ‘PyxmlXPathContext_Get’
#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: CLANG_WARNING: [#def110]
libxml2-2.12.6/python/libxml2-py.c:13729:16: warning[core.NullDereference]: Access to field 'doc' results in a dereference of a null pointer (loaded from variable '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): [#def111]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlXPathGetContextNode’
libxml2-2.12.6/python/libxml2-py.c:13747:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:13745:33: note: in expansion of macro ‘PyxmlXPathContext_Get’
#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: CLANG_WARNING: [#def112]
libxml2-2.12.6/python/libxml2-py.c:13747:16: warning[core.NullDereference]: Access to field 'node' results in a dereference of a null pointer (loaded from variable '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): [#def113]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlXPathGetContextPosition’
libxml2-2.12.6/python/libxml2-py.c:13765:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:13763:33: note: in expansion of macro ‘PyxmlXPathContext_Get’
#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: CLANG_WARNING: [#def114]
libxml2-2.12.6/python/libxml2-py.c:13765:16: warning[core.NullDereference]: Access to field 'proximityPosition' results in a dereference of a null pointer (loaded from variable '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): [#def115]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlXPathGetContextSize’
libxml2-2.12.6/python/libxml2-py.c:13783:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:13781:33: note: in expansion of macro ‘PyxmlXPathContext_Get’
#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: CLANG_WARNING: [#def116]
libxml2-2.12.6/python/libxml2-py.c:13783:16: warning[core.NullDereference]: Access to field 'contextSize' results in a dereference of a null pointer (loaded from variable '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): [#def117]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlXPathGetFunction’
libxml2-2.12.6/python/libxml2-py.c:13801:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:13799:33: note: in expansion of macro ‘PyxmlXPathContext_Get’
#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: CLANG_WARNING: [#def118]
libxml2-2.12.6/python/libxml2-py.c:13801:16: warning[core.NullDereference]: Access to field 'function' results in a dereference of a null pointer (loaded from variable '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): [#def119]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlXPathGetFunctionURI’
libxml2-2.12.6/python/libxml2-py.c:13819:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:13817:33: note: in expansion of macro ‘PyxmlXPathContext_Get’
#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: CLANG_WARNING: [#def120]
libxml2-2.12.6/python/libxml2-py.c:13819:16: warning[core.NullDereference]: Access to field 'functionURI' results in a dereference of a null pointer (loaded from variable '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): [#def121]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlXPathParserGetContext’
libxml2-2.12.6/python/libxml2-py.c:14607:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:14605:39: note: in expansion of macro ‘PyxmlXPathParserContext_Get’
#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: CLANG_WARNING: [#def122]
libxml2-2.12.6/python/libxml2-py.c:14607:16: warning[core.NullDereference]: Access to field 'context' results in a dereference of a null pointer (loaded from variable '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): [#def123]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlXPathSetContextDoc’
libxml2-2.12.6/python/libxml2-py.c:14816:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:14813:33: note: in expansion of macro ‘PyxmlXPathContext_Get’
libxml2-2.12.6/python/libxml2-py.c:14814:23: note: in expansion of macro ‘PyxmlNode_Get’
#14814| doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
#14815|
#14816|-> ctxt->doc = doc;
#14817| Py_INCREF(Py_None);
#14818| return(Py_None);
Error: CLANG_WARNING: [#def124]
libxml2-2.12.6/python/libxml2-py.c:14816:15: warning[core.NullDereference]: Access to field 'doc' results in a dereference of a null pointer (loaded from variable '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): [#def125]
libxml2-2.12.6/python/libxml2-py.c: scope_hint: In function ‘libxml_xmlXPathSetContextNode’
libxml2-2.12.6/python/libxml2-py.c:14835:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxml2-2.12.6/python/libxml2-py.c:14832:33: note: in expansion of macro ‘PyxmlXPathContext_Get’
libxml2-2.12.6/python/libxml2-py.c:14833:25: note: in expansion of macro ‘PyxmlNode_Get’
#14833| node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
#14834|
#14835|-> ctxt->node = node;
#14836| Py_INCREF(Py_None);
#14837| return(Py_None);
Error: CLANG_WARNING: [#def126]
libxml2-2.12.6/python/libxml2-py.c:14835:16: warning[core.NullDereference]: Access to field 'node' results in a dereference of a null pointer (loaded from variable 'ctxt')
#14833| node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
#14834|
#14835|-> ctxt->node = node;
#14836| Py_INCREF(Py_None);
#14837| return(Py_None);
Error: CLANG_WARNING: [#def127]
libxml2-2.12.6/xinclude.c:713:28: warning[core.NullDereference]: Access to field 'parent' results in a dereference of a null pointer (loaded from variable 'insertParent')
# 711| return(result);
# 712| insertLast = insertParent;
# 713|-> insertParent = insertParent->parent;
# 714| }
# 715|
Error: CLANG_WARNING: [#def128]
libxml2-2.12.6/xinclude.c:1181:14: warning[core.NullDereference]: Access to field 'intSubset' results in a dereference of a null pointer (loaded from variable 'doc')
# 1179| return(0);
# 1180|
# 1181|-> target = doc->intSubset;
# 1182| if (target == NULL) {
# 1183| cur = xmlDocGetRootElement(doc);
Error: CLANG_WARNING: [#def129]
libxml2-2.12.6/xlink.c:143:4: warning[deadcode.DeadStores]: Value stored to 'ret' is never read
# 141| /* Humm, fallback method */
# 142| if (xmlStrEqual(role, BAD_CAST"xlink:external-linkset"))
# 143|-> ret = XLINK_TYPE_EXTENDED_SET;
# 144| } else {
# 145| xmlChar buf[200];
Error: CLANG_WARNING: [#def130]
libxml2-2.12.6/xlink.c:150:4: warning[deadcode.DeadStores]: Value stored to 'ret' is never read
# 148| buf[sizeof(buf) - 1] = 0;
# 149| if (xmlStrEqual(role, buf))
# 150|-> ret = XLINK_TYPE_EXTENDED_SET;
# 151|
# 152| }
Error: CPPCHECK_WARNING (CWE-562): [#def131]
libxml2-2.12.6/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): [#def132]
libxml2-2.12.6/xmlcatalog.c: scope_hint: In function ‘xmlShellReadline’
libxml2-2.12.6/xmlcatalog.c:86:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&line_read’
# 84| ret = (char *) malloc(len + 1);
# 85| if (ret != NULL) {
# 86|-> memcpy (ret, line_read, len + 1);
# 87| }
# 88| return(ret);
Error: CLANG_WARNING: [#def133]
libxml2-2.12.6/xmlcatalog.c:110:2: warning[deadcode.DeadStores]: Value stored to 'nbargs' is never read
# 108| */
# 109| cur = cmdline;
# 110|-> nbargs = 0;
# 111| while ((*cur == ' ') || (*cur == '\t')) cur++;
# 112| i = 0;
Error: CLANG_WARNING: [#def134]
libxml2-2.12.6/xmlcatalog.c:409:9: warning[deadcode.DeadStores]: Value stored to 'ret' is never read
# 407|
# 408| if (convert)
# 409|-> ret = xmlCatalogConvert();
# 410|
# 411| if ((add) || (del)) {
Error: GCC_ANALYZER_WARNING (CWE-457): [#def135]
libxml2-2.12.6/xmllint.c: scope_hint: In function ‘xmlShellReadline’
libxml2-2.12.6/xmllint.c:768:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&line_read’
# 766| ret = (char *) malloc(len + 1);
# 767| if (ret != NULL) {
# 768|-> memcpy (ret, line_read, len + 1);
# 769| }
# 770| return(ret);
Error: CLANG_WARNING: [#def136]
libxml2-2.12.6/xmllint.c:1919:2: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
# 1917| if (memory) {
# 1918| xmlFreeParserInputBuffer(input);
# 1919|-> munmap((char *) base, info.st_size);
# 1920| close(fd);
# 1921| }
Error: GCC_ANALYZER_WARNING (CWE-775): [#def137]
libxml2-2.12.6/xmllint.c: scope_hint: In function ‘parseAndPrintFile’
libxml2-2.12.6/xmllint.c:2146:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
# 2144| fprintf(stderr, "Can't open %s\n", filename);
# 2145| progresult = XMLLINT_ERR_UNCLASS;
# 2146|-> return;
# 2147| }
# 2148| }
Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
libxml2-2.12.6/xmllint.c:2146:17: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
# 2144| fprintf(stderr, "Can't open %s\n", filename);
# 2145| progresult = XMLLINT_ERR_UNCLASS;
# 2146|-> return;
# 2147| }
# 2148| }
Error: GCC_ANALYZER_WARNING (CWE-775): [#def139]
libxml2-2.12.6/xmllint.c:2218:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
# 2216| fprintf(stderr, "Can't open %s\n", filename);
# 2217| progresult = XMLLINT_ERR_UNCLASS;
# 2218|-> return;
# 2219| }
# 2220| }
Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
libxml2-2.12.6/xmllint.c:2218:21: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
# 2216| fprintf(stderr, "Can't open %s\n", filename);
# 2217| progresult = XMLLINT_ERR_UNCLASS;
# 2218|-> return;
# 2219| }
# 2220| }
Error: GCC_ANALYZER_WARNING (CWE-775): [#def141]
libxml2-2.12.6/xmllint.c:2777:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
# 2775| "Couldn't allocate validation context\n");
# 2776| progresult = XMLLINT_ERR_MEM;
# 2777|-> xmlFreeDoc(doc);
# 2778| return;
# 2779| }
Error: GCC_ANALYZER_WARNING (CWE-401): [#def142]
libxml2-2.12.6/xmllint.c:2777:13: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
# 2775| "Couldn't allocate validation context\n");
# 2776| progresult = XMLLINT_ERR_MEM;
# 2777|-> xmlFreeDoc(doc);
# 2778| return;
# 2779| }
Error: CPPCHECK_WARNING (CWE-401): [#def143]
libxml2-2.12.6/xmlmemory.c:195: error[memleak]: Memory leak: p
# 193| TEST_POINT
# 194|
# 195|-> return(ret);
# 196| }
# 197|
Error: CPPCHECK_WARNING (CWE-401): [#def144]
libxml2-2.12.6/xmlmemory.c:260: error[memleak]: Memory leak: p
# 258| TEST_POINT
# 259|
# 260|-> return(ret);
# 261| }
# 262| /**
Error: CLANG_WARNING: [#def145]
libxml2-2.12.6/xmlsave.c:779:20: warning[core.NullDereference]: Access to field 'encoding' results in a dereference of a null pointer (loaded from variable 'doc')
# 777| (buf->encoder == NULL) && (buf->conv == NULL)) {
# 778| if (xmlSaveSwitchEncoding(ctxt, (const char*) encoding) < 0) {
# 779|-> doc->encoding = oldenc;
# 780| return(-1);
# 781| }
Error: CLANG_WARNING: [#def146]
libxml2-2.12.6/xmlstring.c:795:9: warning[deadcode.DeadStores]: Value stored to 'ix' is never read
# 793| */
# 794| while ((c = utf[0])) { /* string is 0-terminated */
# 795|-> ix = 0;
# 796| if ((c & 0x80) == 0x00) { /* 1-byte code, starts with 10 */
# 797| ix = 1;
Error: CLANG_WARNING: [#def147]
libxml2-2.12.6/xmlwriter.c:1000:25: warning[deadcode.DeadStores]: Value stored to 'count' is never read
# 998| sum += count;
# 999| if (writer->indent)
# 1000|-> count =
# 1001| xmlOutputBufferWriteString(writer->out, "\n");
# 1002| p->state = XML_TEXTWRITER_TEXT;
Scan Properties
analyzer-version-clang | 18.1.3 |
analyzer-version-cppcheck | 2.13.0 |
analyzer-version-gcc | 14.0.1 |
analyzer-version-gcc-analyzer | 14.0.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-91.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | libxml2-2.12.6-1.fc41 |
store-results-to | /tmp/tmp6wn54zfm/libxml2-2.12.6-1.fc41.tar.xz |
time-created | 2024-04-22 11:13:05 |
time-finished | 2024-04-22 11:18:25 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp6wn54zfm/libxml2-2.12.6-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp6wn54zfm/libxml2-2.12.6-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |