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: CPPCHECK_WARNING (CWE-457): [#def2] 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): [#def3] 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): [#def4] 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-476): [#def5] 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): [#def6] libxml2-2.12.10/encoding.c:1692:29: warning[-Wanalyzer-malloc-leak]: leak of 'icv_in' libxml2-2.12.10/encoding.c:1677:1: enter_function: entry to 'xmlFindCharEncodingHandler' libxml2-2.12.10/encoding.c:1692:8: branch_false: following 'false' branch (when 'name' is non-NULL)... libxml2-2.12.10/encoding.c:1693:9: branch_false: ...to here libxml2-2.12.10/encoding.c:1693:8: branch_false: following 'false' branch... libxml2-2.12.10/encoding.c:1699:14: branch_false: ...to here libxml2-2.12.10/encoding.c:1699:14: call_function: calling 'xmlGetEncodingAlias' from 'xmlFindCharEncodingHandler' libxml2-2.12.10/encoding.c:1699:14: return_function: returning to 'xmlFindCharEncodingHandler' from 'xmlGetEncodingAlias' 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:1729:8: branch_true: following 'true' branch... libxml2-2.12.10/encoding.c:1730:18: branch_true: ...to here libxml2-2.12.10/encoding.c:1730:18: acquire_memory: allocated here libxml2-2.12.10/encoding.c:1735:8: branch_false: following 'false' branch... libxml2-2.12.10/encoding.c:1756:16: branch_false: ...to here libxml2-2.12.10/encoding.c:1756:15: branch_true: following 'true' branch... libxml2-2.12.10/encoding.c:1757:16: branch_true: ...to here libxml2-2.12.10/encoding.c:1757:16: branch_false: following 'false' branch (when 'icv_in == 18446744073709551615')... libxml2-2.12.10/encoding.c:1760:17: branch_false: ...to here libxml2-2.12.10/encoding.c:1797:13: call_function: calling 'xmlParseCharEncoding' from 'xmlFindCharEncodingHandler' libxml2-2.12.10/encoding.c:1797:13: return_function: returning to 'xmlFindCharEncodingHandler' from 'xmlParseCharEncoding' libxml2-2.12.10/encoding.c:1692:29: danger: 'icv_in' leaks here; was allocated at [(21)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/20) # 1690| int i; # 1691| # 1692|-> if (name == NULL) return(NULL); # 1693| if (name[0] == 0) return(NULL); # 1694| Error: GCC_ANALYZER_WARNING (CWE-401): [#def7] 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:1677:1: enter_function: entry to 'xmlFindCharEncodingHandler' libxml2-2.12.10/encoding.c:1692:8: branch_false: following 'false' branch (when 'name' is non-NULL)... libxml2-2.12.10/encoding.c:1693:9: branch_false: ...to here libxml2-2.12.10/encoding.c:1693:8: branch_false: following 'false' branch... libxml2-2.12.10/encoding.c:1699:14: branch_false: ...to here libxml2-2.12.10/encoding.c:1699:14: call_function: calling 'xmlGetEncodingAlias' from 'xmlFindCharEncodingHandler' libxml2-2.12.10/encoding.c:1699:14: return_function: returning to 'xmlFindCharEncodingHandler' from 'xmlGetEncodingAlias' 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: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 [(21)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/20) # 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): [#def8] 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:1677:1: enter_function: entry to 'xmlFindCharEncodingHandler' libxml2-2.12.10/encoding.c:1692:8: branch_false: following 'false' branch (when 'name' is non-NULL)... libxml2-2.12.10/encoding.c:1693:9: branch_false: ...to here libxml2-2.12.10/encoding.c:1693:8: branch_false: following 'false' branch... libxml2-2.12.10/encoding.c:1699:14: branch_false: ...to here libxml2-2.12.10/encoding.c:1699:14: call_function: calling 'xmlGetEncodingAlias' from 'xmlFindCharEncodingHandler' libxml2-2.12.10/encoding.c:1699:14: return_function: returning to 'xmlFindCharEncodingHandler' from 'xmlGetEncodingAlias' 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: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 [(21)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/20) # 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): [#def9] 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-775): [#def10] libxml2-2.12.10/nanoftp.c:882:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*(struct xmlNanoFTPCtxt *)ctx.controlFd' libxml2-2.12.10/nanoftp.c:771:1: enter_function: entry to 'xmlNanoFTPConnect' libxml2-2.12.10/nanoftp.c:778:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.12.10/nanoftp.c:780:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:780:8: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:786:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:797:9: call_function: calling 'have_ipv6' from 'xmlNanoFTPConnect' libxml2-2.12.10/nanoftp.c:797:9: return_function: returning to 'xmlNanoFTPConnect' from 'have_ipv6' libxml2-2.12.10/nanoftp.c:797:8: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:848:13: branch_false: ...to here libxml2-2.12.10/nanoftp.c:852:12: branch_false: following 'false' branch (when 'hp' is non-NULL)... libxml2-2.12.10/nanoftp.c:856:28: branch_false: ...to here libxml2-2.12.10/nanoftp.c:856:12: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:865:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:870:27: acquire_resource: stream socket created here libxml2-2.12.10/nanoftp.c:874:8: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:882:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:882:8: danger: '*(struct xmlNanoFTPCtxt *)ctx.controlFd' leaks here # 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): [#def11] libxml2-2.12.10/nanoftp.c:1368:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*(struct xmlNanoFTPCtxt *)ctx.dataFd' libxml2-2.12.10/nanoftp.c:1274:1: enter_function: entry to 'xmlNanoFTPGetConnection' libxml2-2.12.10/nanoftp.c:1288:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.12.10/nanoftp.c:1290:5: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1304:8: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1309:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1309:8: branch_true: following 'true' branch... libxml2-2.12.10/nanoftp.c:1311:13: branch_true: ...to here libxml2-2.12.10/nanoftp.c:1311:12: branch_true: following 'true' branch... libxml2-2.12.10/nanoftp.c:1312:13: branch_true: ...to here libxml2-2.12.10/nanoftp.c:1318:12: branch_false: following 'false' branch (when 'res >= 0')... libxml2-2.12.10/nanoftp.c:1323:15: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1323:15: call_function: calling 'xmlNanoFTPReadResponse' from 'xmlNanoFTPGetConnection' libxml2-2.12.10/nanoftp.c:1323:15: return_function: returning to 'xmlNanoFTPGetConnection' from 'xmlNanoFTPReadResponse' libxml2-2.12.10/nanoftp.c:1324:12: branch_true: following 'true' branch... libxml2-2.12.10/nanoftp.c:1325:16: branch_true: ...to here libxml2-2.12.10/nanoftp.c:1325:16: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1332:17: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1339:12: branch_true: following 'true' branch... libxml2-2.12.10/nanoftp.c:1340:17: branch_true: ...to here libxml2-2.12.10/nanoftp.c:1340:16: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1348:13: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1368:12: danger: '*(struct xmlNanoFTPCtxt *)ctx.dataFd' leaks here # 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): [#def12] libxml2-2.12.10/nanoftp.c:1382:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*(struct xmlNanoFTPCtxt *)ctx.dataFd' libxml2-2.12.10/nanoftp.c:1288:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.12.10/nanoftp.c:1290:5: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1304:8: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1309:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1309:8: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1374:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1382:12: danger: '*(struct xmlNanoFTPCtxt *)ctx.dataFd' leaks here # 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): [#def13] libxml2-2.12.10/nanoftp.c:1389:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor '*(struct xmlNanoFTPCtxt *)ctx.dataFd' libxml2-2.12.10/nanoftp.c:1288:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.12.10/nanoftp.c:1290:5: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1304:8: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1309:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1309:8: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1374:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1382:12: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1387:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1389:12: danger: '*(struct xmlNanoFTPCtxt *)ctx.dataFd' leaks here # 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): [#def14] libxml2-2.12.10/nanoftp.c:1397:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor libxml2-2.12.10/nanoftp.c:1288:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.12.10/nanoftp.c:1290:5: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1304:8: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1309:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1309:8: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1374:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1382:12: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1387:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1389:12: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1395:13: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1395:12: branch_true: following 'true' branch... libxml2-2.12.10/nanoftp.c:1397:13: branch_true: ...to here libxml2-2.12.10/nanoftp.c:1397:13: danger: leaks here # 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): [#def15] libxml2-2.12.10/nanoftp.c:1407:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor libxml2-2.12.10/nanoftp.c:1288:8: branch_false: following 'false' branch (when 'ctx' is non-NULL)... libxml2-2.12.10/nanoftp.c:1290:5: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1304:8: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1309:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1309:8: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1374:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1382:12: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1387:9: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1389:12: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1395:13: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1395:12: branch_false: following 'false' branch... libxml2-2.12.10/nanoftp.c:1409:30: branch_false: ...to here libxml2-2.12.10/nanoftp.c:1407:13: danger: leaks here # 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): [#def16] 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: CPPCHECK_WARNING (CWE-562): [#def17] libxml2-2.12.10/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): [#def18] libxml2-2.12.10/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: CPPCHECK_WARNING (CWE-457): [#def19] libxml2-2.12.10/parser.c:8965: error[uninitvar]: Uninitialized variable: l.hashValue # 8963| GROW; # 8964| if (ctxt->instate == XML_PARSER_EOF) # 8965|-> return(l); # 8966| start = CUR_PTR - BASE_PTR; # 8967| Error: GCC_ANALYZER_WARNING (CWE-835): [#def20] libxml2-2.12.10/parserInternals.c:1105:20: warning[-Wanalyzer-infinite-loop]: infinite loop # 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.10/parserInternals.c:1112:20: 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.10/pattern.c:515:22: warning[-Wanalyzer-null-dereference]: dereference of NULL 'node' libxml2-2.12.10/pattern.c:2378:1: enter_function: entry to 'xmlPatternMatch' libxml2-2.12.10/pattern.c:2382:8: branch_false: following 'false' branch... branch_false: ...to here libxml2-2.12.10/pattern.c:2385:12: branch_true: following 'true' branch (when 'comp' is non-NULL)... libxml2-2.12.10/pattern.c:2386:15: branch_true: ...to here libxml2-2.12.10/pattern.c:2386:15: call_function: calling 'xmlPatMatch' from 'xmlPatternMatch' libxml2-2.12.10/pattern.c:2386:15: return_function: returning to 'xmlPatternMatch' from 'xmlPatMatch' libxml2-2.12.10/pattern.c:2387:12: branch_false: following 'false' branch... libxml2-2.12.10/pattern.c:2389:9: branch_false: ...to here libxml2-2.12.10/pattern.c:2385:12: branch_true: following 'true' branch (when 'comp' is non-NULL)... libxml2-2.12.10/pattern.c:2386:15: branch_true: ...to here libxml2-2.12.10/pattern.c:2386:15: call_function: calling 'xmlPatMatch' from 'xmlPatternMatch' # 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.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: GCC_ANALYZER_WARNING (CWE-457): [#def85] libxml2-2.12.10/xmllint.c:768:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&line_read’ libxml2-2.12.10/xmllint.c:762:8: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:764:5: branch_false: ...to here libxml2-2.12.10/xmllint.c:767:8: branch_true: following ‘true’ branch (when ‘ret’ is non-NULL)... libxml2-2.12.10/xmllint.c:768:9: branch_true: ...to here libxml2-2.12.10/xmllint.c:768:9: danger: use of uninitialized value ‘&line_read’ here # 766| ret = (char *) malloc(len + 1); # 767| if (ret != NULL) { # 768|-> memcpy (ret, line_read, len + 1); # 769| } # 770| return(ret); Error: GCC_ANALYZER_WARNING (CWE-775): [#def86] libxml2-2.12.10/xmllint.c:2146:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’ libxml2-2.12.10/xmllint.c:2120:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)... libxml2-2.12.10/xmllint.c:2133:14: branch_false: ...to here libxml2-2.12.10/xmllint.c:2133:13: branch_true: following ‘true’ branch... libxml2-2.12.10/xmllint.c:2142:17: acquire_resource: opened here libxml2-2.12.10/xmllint.c:2143:16: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2150:15: branch_false: ...to here libxml2-2.12.10/xmllint.c:2155:16: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2157:13: branch_false: ...to here libxml2-2.12.10/xmllint.c:2146:17: danger: ‘f’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4) # 2144| fprintf(stderr, "Can't open %s\n", filename); # 2145| progresult = XMLLINT_ERR_UNCLASS; # 2146|-> return; # 2147| } # 2148| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def87] libxml2-2.12.10/xmllint.c:2146:17: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ libxml2-2.12.10/xmllint.c:2120:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)... libxml2-2.12.10/xmllint.c:2133:14: branch_false: ...to here libxml2-2.12.10/xmllint.c:2133:13: branch_true: following ‘true’ branch... libxml2-2.12.10/xmllint.c:2142:17: acquire_memory: allocated here libxml2-2.12.10/xmllint.c:2143:16: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2150:15: branch_false: ...to here libxml2-2.12.10/xmllint.c:2155:16: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2157:13: branch_false: ...to here libxml2-2.12.10/xmllint.c:2146:17: danger: ‘f’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4) # 2144| fprintf(stderr, "Can't open %s\n", filename); # 2145| progresult = XMLLINT_ERR_UNCLASS; # 2146|-> return; # 2147| } # 2148| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def88] libxml2-2.12.10/xmllint.c:2218:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’ libxml2-2.12.10/xmllint.c:2120:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)... libxml2-2.12.10/xmllint.c:2133:14: branch_false: ...to here libxml2-2.12.10/xmllint.c:2194:13: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2203:13: branch_false: ...to here libxml2-2.12.10/xmllint.c:2203:12: branch_true: following ‘true’ branch... libxml2-2.12.10/xmllint.c:2211:18: branch_true: ...to here libxml2-2.12.10/xmllint.c:2214:21: acquire_resource: opened here libxml2-2.12.10/xmllint.c:2215:20: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2222:19: branch_false: ...to here libxml2-2.12.10/xmllint.c:2227:20: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2229:17: branch_false: ...to here libxml2-2.12.10/xmllint.c:2218:21: danger: ‘f’ leaks here; was opened at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6) # 2216| fprintf(stderr, "Can't open %s\n", filename); # 2217| progresult = XMLLINT_ERR_UNCLASS; # 2218|-> return; # 2219| } # 2220| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def89] libxml2-2.12.10/xmllint.c:2218:21: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ libxml2-2.12.10/xmllint.c:2120:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)... libxml2-2.12.10/xmllint.c:2133:14: branch_false: ...to here libxml2-2.12.10/xmllint.c:2194:13: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2203:13: branch_false: ...to here libxml2-2.12.10/xmllint.c:2203:12: branch_true: following ‘true’ branch... libxml2-2.12.10/xmllint.c:2211:18: branch_true: ...to here libxml2-2.12.10/xmllint.c:2214:21: acquire_memory: allocated here libxml2-2.12.10/xmllint.c:2215:20: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2222:19: branch_false: ...to here libxml2-2.12.10/xmllint.c:2227:20: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2229:17: branch_false: ...to here libxml2-2.12.10/xmllint.c:2218:21: danger: ‘f’ leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6) # 2216| fprintf(stderr, "Can't open %s\n", filename); # 2217| progresult = XMLLINT_ERR_UNCLASS; # 2218|-> return; # 2219| } # 2220| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def90] libxml2-2.12.10/xmllint.c:2777:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’ libxml2-2.12.10/xmllint.c:2120:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)... libxml2-2.12.10/xmllint.c:2133:14: branch_false: ...to here libxml2-2.12.10/xmllint.c:2194:13: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2203:13: branch_false: ...to here libxml2-2.12.10/xmllint.c:2203:12: branch_true: following ‘true’ branch... libxml2-2.12.10/xmllint.c:2211:18: branch_true: ...to here libxml2-2.12.10/xmllint.c:2214:21: acquire_resource: opened here libxml2-2.12.10/xmllint.c:2215:20: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2222:19: branch_false: ...to here libxml2-2.12.10/xmllint.c:2225:16: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2231:13: branch_false: ...to here libxml2-2.12.10/xmllint.c:2245:16: branch_false: following ‘false’ branch... branch_false: ...to here libxml2-2.12.10/xmllint.c:2375:8: branch_false: following ‘false’ branch (when ‘doc’ is non-NULL)... libxml2-2.12.10/xmllint.c:2380:9: branch_false: ...to here libxml2-2.12.10/xmllint.c:2458:8: branch_true: following ‘true’ branch... libxml2-2.12.10/xmllint.c:2463:12: branch_true: following ‘true’ branch... branch_true: ...to here libxml2-2.12.10/xmllint.c:2465:20: branch_true: following ‘true’ branch (when ‘node’ is non-NULL)... libxml2-2.12.10/xmllint.c:2465:39: branch_true: ...to here libxml2-2.12.10/xmllint.c:2466:16: branch_true: following ‘true’ branch (when ‘node’ is non-NULL)... libxml2-2.12.10/xmllint.c:2467:47: branch_true: ...to here libxml2-2.12.10/xmllint.c:2468:20: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2470:27: branch_false: ...to here libxml2-2.12.10/xmllint.c:2470:27: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2473:21: branch_false: ...to here libxml2-2.12.10/xmllint.c:2777:13: danger: ‘f’ leaks here; was opened at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6) # 2775| "Couldn't allocate validation context\n"); # 2776| progresult = XMLLINT_ERR_MEM; # 2777|-> xmlFreeDoc(doc); # 2778| return; # 2779| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def91] libxml2-2.12.10/xmllint.c:2777:13: warning[-Wanalyzer-malloc-leak]: leak of ‘f’ libxml2-2.12.10/xmllint.c:2120:8: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)... libxml2-2.12.10/xmllint.c:2133:14: branch_false: ...to here libxml2-2.12.10/xmllint.c:2194:13: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2203:13: branch_false: ...to here libxml2-2.12.10/xmllint.c:2203:12: branch_true: following ‘true’ branch... libxml2-2.12.10/xmllint.c:2211:18: branch_true: ...to here libxml2-2.12.10/xmllint.c:2214:21: acquire_memory: allocated here libxml2-2.12.10/xmllint.c:2215:20: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2222:19: branch_false: ...to here libxml2-2.12.10/xmllint.c:2225:16: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2231:13: branch_false: ...to here libxml2-2.12.10/xmllint.c:2245:16: branch_false: following ‘false’ branch... branch_false: ...to here libxml2-2.12.10/xmllint.c:2375:8: branch_false: following ‘false’ branch (when ‘doc’ is non-NULL)... libxml2-2.12.10/xmllint.c:2380:9: branch_false: ...to here libxml2-2.12.10/xmllint.c:2458:8: branch_true: following ‘true’ branch... libxml2-2.12.10/xmllint.c:2463:12: branch_true: following ‘true’ branch... branch_true: ...to here libxml2-2.12.10/xmllint.c:2465:20: branch_true: following ‘true’ branch (when ‘node’ is non-NULL)... libxml2-2.12.10/xmllint.c:2465:39: branch_true: ...to here libxml2-2.12.10/xmllint.c:2466:16: branch_true: following ‘true’ branch (when ‘node’ is non-NULL)... libxml2-2.12.10/xmllint.c:2467:47: branch_true: ...to here libxml2-2.12.10/xmllint.c:2468:20: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2470:27: branch_false: ...to here libxml2-2.12.10/xmllint.c:2470:27: branch_false: following ‘false’ branch... libxml2-2.12.10/xmllint.c:2473:21: branch_false: ...to here libxml2-2.12.10/xmllint.c:2777:13: danger: ‘f’ leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6) # 2775| "Couldn't allocate validation context\n"); # 2776| progresult = XMLLINT_ERR_MEM; # 2777|-> xmlFreeDoc(doc); # 2778| return; # 2779| } Error: CPPCHECK_WARNING (CWE-401): [#def92] 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): [#def93] libxml2-2.12.10/xmlmemory.c:260: error[memleak]: Memory leak: p # 258| TEST_POINT # 259| # 260|-> return(ret); # 261| } # 262| /** Error: CPPCHECK_WARNING (CWE-758): [#def94] 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.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-229.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.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | libxml2-2.12.10-1.fc43 |
store-results-to | /tmp/tmpg3qwzpm6/libxml2-2.12.10-1.fc43.tar.xz |
time-created | 2025-04-25 14:20:51 |
time-finished | 2025-04-25 14:25:17 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpg3qwzpm6/libxml2-2.12.10-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpg3qwzpm6/libxml2-2.12.10-1.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |