Fixed findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
openscap-1.4.5/src/CPE/cpedict_priv.c:925:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘product’
#  923|   			version = cpe_version_new();
#  924|   			version->value = (char *)xmlTextReaderGetAttribute(reader, ATTR_VALUE_STR);
#  925|-> 			oscap_list_add(product->versions, version);
#  926|   		} else if (xmlStrcmp(xmlTextReaderConstLocalName(reader), TAG_UPDATE_STR) == 0) {
#  927|   			// initialization

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
openscap-1.4.5/src/CPE/cpedict_priv.c:930:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘version’
#  928|   			update = cpe_update_new();
#  929|   			update->value = (char *)xmlTextReaderGetAttribute(reader, ATTR_VALUE_STR);
#  930|-> 			oscap_list_add(version->updates, update);
#  931|   		} else if (xmlStrcmp(xmlTextReaderConstLocalName(reader), TAG_EDITION_STR) == 0) {
#  932|   			// initialization

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
openscap-1.4.5/src/CPE/cpedict_priv.c:935:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘update’
#  933|   			edition = cpe_edition_new();
#  934|   			edition->value = (char *)xmlTextReaderGetAttribute(reader, ATTR_VALUE_STR);
#  935|-> 			oscap_list_add(update->editions, edition);
#  936|   		} else if (xmlStrcmp(xmlTextReaderConstLocalName(reader), TAG_LANGUAGE_STR) == 0) {
#  937|   			// initialization

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
openscap-1.4.5/src/CPE/cpedict_priv.c:940:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘edition’
#  938|   			language = cpe_language_new();
#  939|   			language->value = (char *)xmlTextReaderGetAttribute(reader, ATTR_VALUE_STR);
#  940|-> 			oscap_list_add(edition->languages, language);
#  941|   		} else {
#  942|   			oscap_seterr(OSCAP_EFAMILY_OSCAP, "Unknown XML element withinin CPE vendor element, local name is '%s'.",

Error: GCC_ANALYZER_WARNING (CWE-688): [#def5]
openscap-1.4.5/src/DS/rds_index.c: scope_hint: In function ‘rds_index_get_report_request’
openscap-1.4.5/src/DS/rds_index.c:104:21: warning[-Wanalyzer-null-argument]: use of NULL ‘id’ where non-null expected
openscap-1.4.5/src/common/util.h:34: included_from: Included from here.
openscap-1.4.5/src/common/list.h:34: included_from: Included from here.
openscap-1.4.5/src/DS/rds_index.c:28: included_from: Included from here.
/usr/include/string.h:171:12: note: argument 2 of ‘strcmp’ must be non-null
#  102|   	{
#  103|   		struct rds_report_request_index* rr_index = rds_report_request_index_iterator_next(it);
#  104|-> 		if (strcmp(rds_report_request_index_get_id(rr_index), id) == 0) {
#  105|   			ret = rr_index;
#  106|   			break;

Scan Properties

analyzer-version-clippy1.96.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.96.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-197.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-nameopenscap-1.4.5-0.20260603093305243481.pr2362.63.ge489542dc
diffbase-store-results-to/tmp/tmp7_7pq_8s/openscap-1.4.5-0.20260603093305243481.pr2362.63.ge489542dc.tar.xz
diffbase-time-created2026-06-03 09:49:04
diffbase-time-finished2026-06-03 09:55:05
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmp7_7pq_8s/openscap-1.4.5-0.20260603093305243481.pr2362.63.ge489542dc.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp7_7pq_8s/openscap-1.4.5-0.20260603093305243481.pr2362.63.ge489542dc.src.rpm'
diffbase-tool-versioncsmock-3.8.6.20260603.095741.gbb48252-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-197.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-nameopenscap-1.4.5-0.20260602224444546479.main.61.g54a9a0598
store-results-to/tmp/tmp2u8vgjht/openscap-1.4.5-0.20260602224444546479.main.61.g54a9a0598.tar.xz
time-created2026-06-03 09:42:12
time-finished2026-06-03 09:48:32
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmp2u8vgjht/openscap-1.4.5-0.20260602224444546479.main.61.g54a9a0598.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp2u8vgjht/openscap-1.4.5-0.20260602224444546479.main.61.g54a9a0598.src.rpm'
tool-versioncsmock-3.8.6.20260603.095741.gbb48252-1.el9