Fixed findings

List of Findings

Error: CPPCHECK_WARNING (CWE-457): [#def1]
libxml2-2.12.10/HTMLparser.c:2586: warning[uninitvar]: Uninitialized variable: loc
# 2584|       }
# 2585|   
# 2586|->     return(xmlDictLookup(ctxt->dict, loc, i));
# 2587|   }
# 2588|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libxml2-2.12.10/encoding.c:1729:8: warning[-Wanalyzer-malloc-leak]: leak of 'iconv_open("UTF-8", name)'
libxml2-2.12.10/encoding.c:1700:8: branch_false: following 'false' branch...
libxml2-2.12.10/encoding.c:1706:5: branch_false: ...to here
libxml2-2.12.10/encoding.c:1706:16: branch_true: following 'true' branch (when 'i != 99')...
libxml2-2.12.10/encoding.c:1707:27: branch_true: ...to here
libxml2-2.12.10/encoding.c:1712:17: branch_true: following 'true' branch (when 'i != 8')...
libxml2-2.12.10/encoding.c:1713:27: branch_true: ...to here
libxml2-2.12.10/encoding.c:1713:12: branch_false: following 'false' branch (when the strings are non-equal)...
libxml2-2.12.10/encoding.c:1712:49: branch_false: ...to here
libxml2-2.12.10/encoding.c:1713:12: branch_false: following 'false' branch (when the strings are non-equal)...
libxml2-2.12.10/encoding.c:1712:49: branch_false: ...to here
libxml2-2.12.10/encoding.c:1727:14: acquire_memory: allocated here
libxml2-2.12.10/encoding.c:1729:8: danger: 'iconv_open("UTF-8", name)' leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 1727|       icv_in = iconv_open("UTF-8", name);
# 1728|       icv_out = iconv_open(name, "UTF-8");
# 1729|->     if (icv_in == (iconv_t) -1) {
# 1730|           icv_in = iconv_open("UTF-8", upper);
# 1731|       }

Error: GCC_ANALYZER_WARNING (CWE-835): [#def3]
libxml2-2.12.10/hash.c:931:12: warning[-Wanalyzer-infinite-loop]: infinite loop
libxml2-2.12.10/hash.c:931:12: danger: infinite loop here
libxml2-2.12.10/hash.c:931:12: branch_true: if it ever follows 'true' branch, it will always do so...
libxml2-2.12.10/hash.c:932:12: branch_true: ...to here
libxml2-2.12.10/hash.c:932:12: branch_true: when 'end <= entry': always following 'true' branch...
libxml2-2.12.10/hash.c:932:12: branch_true: ...to here
#  929|       entry = hash->table;
#  930|       end = &hash->table[hash->size];
#  931|->     while (entry->hashValue != 0) {
#  932|           if (++entry >= end)
#  933|               entry = hash->table;

Error: GCC_ANALYZER_WARNING (CWE-835): [#def4]
libxml2-2.12.10/hash.c:1011:12: warning[-Wanalyzer-infinite-loop]: infinite loop
libxml2-2.12.10/hash.c:1011:12: danger: infinite loop here
libxml2-2.12.10/hash.c:1011:12: branch_true: if it ever follows 'true' branch, it will always do so...
libxml2-2.12.10/hash.c:1012:12: branch_true: ...to here
libxml2-2.12.10/hash.c:1012:12: branch_true: when 'end <= entry': always following 'true' branch...
libxml2-2.12.10/hash.c:1012:12: branch_true: ...to here
# 1009|       entry = hash->table;
# 1010|       end = &hash->table[hash->size];
# 1011|->     while (entry->hashValue != 0) {
# 1012|           if (++entry >= end)
# 1013|               entry = hash->table;

Error: CPPCHECK_WARNING (CWE-457): [#def5]
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): [#def6]
libxml2-2.12.10/parserInternals.c:1101:20: warning[-Wanalyzer-infinite-loop]: infinite loop
# 1099|   
# 1100|               i += 8;
# 1101|->             while (IS_BLANK_CH(out[i]))
# 1102|                   i += 1;
# 1103|               if (out[i++] != '=')

Error: CPPCHECK_WARNING (CWE-401): [#def7]
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): [#def8]
libxml2-2.12.10/xmlmemory.c:260: error[memleak]: Memory leak: p
#  258|       TEST_POINT
#  259|   
#  260|->     return(ret);
#  261|   }
#  262|   /**

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
libxml2-2.12.10/xmlreader.c:1254:14: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
libxml2-2.12.10/xmlreader.c:1161:1: enter_function: entry to 'xmlTextReaderRead'
libxml2-2.12.10/xmlreader.c:1172:8: branch_false: following 'false' branch...
libxml2-2.12.10/xmlreader.c:1175:9: branch_false: ...to here
libxml2-2.12.10/xmlreader.c:1175:8: branch_true: following 'true' branch...
libxml2-2.12.10/xmlreader.c:1176:9: branch_true: ...to here
libxml2-2.12.10/xmlreader.c:1181:19: call_function: calling 'xmlTextReaderPushData' from 'xmlTextReaderRead'
libxml2-2.12.10/xmlreader.c:1181:19: return_function: returning to 'xmlTextReaderRead' from 'xmlTextReaderPushData'
libxml2-2.12.10/xmlreader.c:1182:20: branch_false: following 'false' branch...
libxml2-2.12.10/xmlreader.c:1187:19: branch_false: ...to here
libxml2-2.12.10/xmlreader.c:1381:8: branch_true: following 'true' branch...
libxml2-2.12.10/xmlreader.c:1381:9: branch_true: following 'true' branch...
libxml2-2.12.10/xmlreader.c:1384:10: branch_true: ...to here
libxml2-2.12.10/xmlreader.c:1381:9: branch_true: following 'true' branch...
libxml2-2.12.10/xmlreader.c:1385:10: branch_true: ...to here
libxml2-2.12.10/xmlreader.c:1381:9: branch_true: following 'true' branch...
libxml2-2.12.10/xmlreader.c:1386:10: branch_true: ...to here
libxml2-2.12.10/xmlreader.c:1397:13: call_function: calling 'xmlTextReaderExpand' from 'xmlTextReaderRead'
libxml2-2.12.10/xmlreader.c:1397:13: return_function: returning to 'xmlTextReaderRead' from 'xmlTextReaderExpand'
libxml2-2.12.10/xmlreader.c:1397:12: branch_false: following 'false' branch...
libxml2-2.12.10/xmlreader.c:1399:9: branch_false: ...to here
libxml2-2.12.10/xmlreader.c:1401:8: branch_true: following 'true' branch...
libxml2-2.12.10/xmlreader.c:1217:8: branch_false: following 'false' branch...
libxml2-2.12.10/xmlreader.c:1217:8: branch_false: ...to here
libxml2-2.12.10/xmlreader.c:1229:12: branch_false: following 'false' branch...
libxml2-2.12.10/xmlreader.c:1253:8: branch_false: ...to here
libxml2-2.12.10/xmlreader.c:1253:8: branch_true: following 'true' branch (when 'oldstate != 4')...
libxml2-2.12.10/xmlreader.c:1254:14: branch_true: ...to here
libxml2-2.12.10/xmlreader.c:1254:14: danger: dereference of NULL '<unknown>'
# 1252|       }
# 1253|       if (oldstate != XML_TEXTREADER_BACKTRACK) {
# 1254|-> 	if ((reader->node->children != NULL) &&
# 1255|   	    (reader->node->type != XML_ENTITY_REF_NODE) &&
# 1256|   	    (reader->node->type != XML_XINCLUDE_START) &&

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
libxml2-2.12.10/xmlreader.c:1264:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
libxml2-2.12.10/xmlreader.c:1161:1: enter_function: entry to 'xmlTextReaderRead'
libxml2-2.12.10/xmlreader.c:1172:8: branch_false: following 'false' branch...
libxml2-2.12.10/xmlreader.c:1175:9: branch_false: ...to here
libxml2-2.12.10/xmlreader.c:1175:8: branch_false: following 'false' branch...
libxml2-2.12.10/xmlreader.c:1212:5: branch_false: ...to here
libxml2-2.12.10/xmlreader.c:1217:8: branch_false: following 'false' branch...
libxml2-2.12.10/xmlreader.c:1217:8: branch_false: ...to here
libxml2-2.12.10/xmlreader.c:1229:12: branch_true: following 'true' branch...
libxml2-2.12.10/xmlreader.c:1229:39: branch_true: ...to here
libxml2-2.12.10/xmlreader.c:1229:12: branch_true: following 'true' branch...
libxml2-2.12.10/xmlreader.c:1230:13: branch_true: ...to here
libxml2-2.12.10/xmlreader.c:1229:12: branch_true: following 'true' branch...
libxml2-2.12.10/xmlreader.c:1229:12: branch_true: ...to here
libxml2-2.12.10/xmlreader.c:1229:12: branch_true: following 'true' branch (when 'oldstate == 4')...
libxml2-2.12.10/xmlreader.c:1240:14: branch_true: ...to here
libxml2-2.12.10/xmlreader.c:1229:12: branch_true: following 'true' branch...
libxml2-2.12.10/xmlreader.c:1243:13: branch_true: ...to here
libxml2-2.12.10/xmlreader.c:1229:12: branch_true: following 'true' branch...
libxml2-2.12.10/xmlreader.c:1244:15: branch_true: ...to here
libxml2-2.12.10/xmlreader.c:1244:15: call_function: calling 'xmlTextReaderPushData' from 'xmlTextReaderRead'
libxml2-2.12.10/xmlreader.c:1244:15: return_function: returning to 'xmlTextReaderRead' from 'xmlTextReaderPushData'
libxml2-2.12.10/xmlreader.c:1245:12: branch_false: following 'false' branch...
libxml2-2.12.10/xmlreader.c:1250:13: branch_false: ...to here
libxml2-2.12.10/xmlreader.c:1250:12: branch_false: following 'false' branch...
libxml2-2.12.10/xmlreader.c:1250:12: branch_false: ...to here
libxml2-2.12.10/xmlreader.c:1229:12: branch_false: following 'false' branch...
libxml2-2.12.10/xmlreader.c:1253:8: branch_false: ...to here
libxml2-2.12.10/xmlreader.c:1253:8: branch_false: following 'false' branch (when 'oldstate == 4')...
libxml2-2.12.10/xmlreader.c:1264:9: branch_false: ...to here
libxml2-2.12.10/xmlreader.c:1264:9: danger: dereference of NULL '<unknown>'
# 1262|   	}
# 1263|       }
# 1264|->     if (reader->node->next != NULL) {
# 1265|   	if ((oldstate == XML_TEXTREADER_ELEMENT) &&
# 1266|               (reader->node->type == XML_ELEMENT_NODE) &&

Scan Properties

analyzer-version-clippy1.95.0
analyzer-version-cppcheck2.20.0
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.95.0
diffbase-analyzer-version-cppcheck2.20.0
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-174.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namelibxml2-2.13.9-1.fc45
diffbase-store-results-to/tmp/tmpetjb8u_w/libxml2-2.13.9-1.fc45.tar.xz
diffbase-time-created2026-06-01 14:56:00
diffbase-time-finished2026-06-01 14:59:44
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpetjb8u_w/libxml2-2.13.9-1.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpetjb8u_w/libxml2-2.13.9-1.fc45.src.rpm'
diffbase-tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-174.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibxml2-2.12.10-6.fc44
store-results-to/tmp/tmpjpfumcy1/libxml2-2.12.10-6.fc44.tar.xz
time-created2026-06-01 14:51:31
time-finished2026-06-01 14:55:42
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpjpfumcy1/libxml2-2.12.10-6.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpjpfumcy1/libxml2-2.12.10-6.fc44.src.rpm'
tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9