libmodulemd-2.15.3-3.fc45

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1]
modulemd-2.15.3/modulemd/modulemd-module.c:771:3: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
modulemd-2.15.3/modulemd/modulemd-module.c:764:1: enter_function: entry to ‘modulemd_module_add_translation’
modulemd-2.15.3/modulemd/modulemd-module.c:771:3: call_function: calling ‘modulemd_module_get_module_name’ from ‘modulemd_module_add_translation’
modulemd-2.15.3/modulemd/modulemd-module.c:771:3: return_function: returning to ‘modulemd_module_add_translation’ from ‘modulemd_module_get_module_name’
modulemd-2.15.3/modulemd/modulemd-module.c:771:3: danger: argument 2 (‘modulemd_module_get_module_name(self)’) NULL where non-null expected
#  769|     ModulemdTranslation *newtrans = NULL;
#  770|   
#  771|->   g_return_if_fail (
#  772|       g_str_equal (modulemd_translation_get_module_name (translation),
#  773|                    modulemd_module_get_module_name (self)));

Error: GCC_ANALYZER_WARNING (CWE-688): [#def2]
modulemd-2.15.3/modulemd/modulemd-module.c:820:3: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
modulemd-2.15.3/modulemd/modulemd-module.c:812:1: enter_function: entry to ‘modulemd_module_add_obsoletes’
modulemd-2.15.3/modulemd/modulemd-module.c:820:3: call_function: calling ‘modulemd_module_get_module_name’ from ‘modulemd_module_add_obsoletes’
modulemd-2.15.3/modulemd/modulemd-module.c:820:3: return_function: returning to ‘modulemd_module_add_obsoletes’ from ‘modulemd_module_get_module_name’
modulemd-2.15.3/modulemd/modulemd-module.c:820:3: danger: argument 2 (‘modulemd_module_get_module_name(self)’) NULL where non-null expected
#  818|     ModulemdObsoletes *current_obsoletes = NULL;
#  819|   
#  820|->   g_return_if_fail (
#  821|       g_str_equal (modulemd_obsoletes_get_module_name (obsoletes),
#  822|                    modulemd_module_get_module_name (self)));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
modulemd-2.15.3/modulemd/modulemd-module.c:1024:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
modulemd-2.15.3/modulemd/modulemd-module.c:970:1: enter_function: entry to ‘modulemd_module_upgrade_streams’
modulemd-2.15.3/modulemd/modulemd-module.c:983:3: branch_true: following ‘true’ branch...
modulemd-2.15.3/modulemd/modulemd-module.c:985:39: branch_true: ...to here
modulemd-2.15.3/modulemd/modulemd-module.c:987:21: branch_true: following ‘true’ branch...
modulemd-2.15.3/modulemd/modulemd-module.c:989:22: branch_true: ...to here
modulemd-2.15.3/modulemd/modulemd-module.c:994:10: branch_false: following ‘false’ branch (when ‘current_mdversion > 0’)...
modulemd-2.15.3/modulemd/modulemd-module.c:1004:10: branch_false: ...to here
modulemd-2.15.3/modulemd/modulemd-module.c:1004:10: branch_false: following ‘false’ branch (when ‘current_mdversion != mdversion’)...
modulemd-2.15.3/modulemd/modulemd-module.c:1011:29: branch_false: ...to here
modulemd-2.15.3/modulemd/modulemd-module.c:1013:14: branch_false: following ‘false’ branch...
modulemd-2.15.3/modulemd/modulemd-module.c:1023:30: branch_false: ...to here
modulemd-2.15.3/modulemd/modulemd-module.c:1023:30: call_function: calling ‘modulemd_module_get_all_streams’ from ‘modulemd_module_upgrade_streams’
modulemd-2.15.3/modulemd/modulemd-module.c:1023:30: return_function: returning to ‘modulemd_module_upgrade_streams’ from ‘modulemd_module_get_all_streams’
modulemd-2.15.3/modulemd/modulemd-module.c:1024:33: danger: dereference of NULL ‘modulemd_module_get_all_streams(modulemd_module_stream_upgrade_ext(g_object_ref(*<unknown>), (long unsigned int)mdversion, & nested_error))’
# 1022|             /* loop through all upgraded streams */
# 1023|             upgraded_streams = modulemd_module_get_all_streams (upgraded_module);
# 1024|->           for (guint i = 0; i < upgraded_streams->len; i++)
# 1025|               {
# 1026|                 upgraded_stream =

Error: GCC_ANALYZER_WARNING (CWE-688): [#def4]
modulemd-2.15.3/modulemd/tests/test-modulemd-compression.c:103:12: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(g_strdup_printf("%s/compression/%s", g_getenv("TEST_DATA_PATH"), expected[i].filename), "rbe")’ where non-null expected
modulemd-2.15.3/modulemd/tests/test-modulemd-compression.c:94:22: branch_true: following ‘true’ branch...
modulemd-2.15.3/modulemd/tests/test-modulemd-compression.c:96:18: branch_true: ...to here
modulemd-2.15.3/modulemd/tests/test-modulemd-compression.c:101:20: acquire_memory: allocated here
modulemd-2.15.3/modulemd/tests/test-modulemd-compression.c:102:7: release_memory: assuming ‘fopen(g_strdup_printf("%s/compression/%s", g_getenv("TEST_DATA_PATH"), expected[i].filename), "rbe")’ is NULL
modulemd-2.15.3/modulemd/tests/test-modulemd-compression.c:102:7: branch_false: following ‘false’ branch...
modulemd-2.15.3/modulemd/tests/test-modulemd-compression.c:102:7: branch_false: ...to here
modulemd-2.15.3/modulemd/tests/test-modulemd-compression.c:103:12: danger: argument 1 (‘fopen(g_strdup_printf("%s/compression/%s", g_getenv("TEST_DATA_PATH"), expected[i].filename), "rbe")’) NULL where non-null expected
#  101|         filestream = g_fopen (filename, "rbe");
#  102|         g_assert_nonnull (filestream);
#  103|->       fd = fileno (filestream);
#  104|         result = modulemd_detect_compression (filename, fd, &error);
#  105|         g_assert_no_error (error);

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-227.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-namelibmodulemd-2.15.3-3.fc45
store-results-to/tmp/tmptn1xs7t4/libmodulemd-2.15.3-3.fc45.tar.xz
time-created2026-08-03 17:33:16
time-finished2026-08-03 17:35:25
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmptn1xs7t4/libmodulemd-2.15.3-3.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmptn1xs7t4/libmodulemd-2.15.3-3.fc45.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9