Error: GCC_ANALYZER_WARNING (CWE-688): [#def1] swtpm-0.8.1-build/swtpm-d2849a9f5ced70438d67036693438344b47b4161/src/swtpm_localca/swtpm_localca.c: scope_hint: In function ‘create_cert’ swtpm-0.8.1-build/swtpm-d2849a9f5ced70438d67036693438344b47b4161/src/swtpm_localca/swtpm_localca.c:405:9: warning[-Wanalyzer-null-argument]: use of NULL ‘typ’ where non-null expected /usr/include/glib-2.0/glib/gstring.h:37: included_from: Included from here. /usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here. /usr/include/glib-2.0/glib.h:56: included_from: Included from here. swtpm-0.8.1-build/swtpm-d2849a9f5ced70438d67036693438344b47b4161/src/swtpm_localca/swtpm_localca.c:25: included_from: Included from here. swtpm-0.8.1-build/swtpm-d2849a9f5ced70438d67036693438344b47b4161/src/swtpm_localca/swtpm_localca.c:624:19: note: in expansion of macro ‘g_strdup’ swtpm-0.8.1-build/swtpm-d2849a9f5ced70438d67036693438344b47b4161/src/swtpm_localca/swtpm_localca.c: scope_hint: In function ‘create_cert’ swtpm-0.8.1-build/swtpm-d2849a9f5ced70438d67036693438344b47b4161/src/swtpm_localca/swtpm_localca.c:750:10: note: in expansion of macro ‘g_str_has_prefix’ swtpm-0.8.1-build/swtpm-d2849a9f5ced70438d67036693438344b47b4161/src/swtpm_localca/swtpm_localca.c: scope_hint: In function ‘create_cert’ swtpm-0.8.1-build/swtpm-d2849a9f5ced70438d67036693438344b47b4161/src/swtpm_localca/swtpm_localca.c: scope_hint: In function ‘create_cert’ swtpm-0.8.1-build/swtpm-d2849a9f5ced70438d67036693438344b47b4161/src/swtpm_localca/swtpm_localca.c:398:19: note: in expansion of macro ‘g_strdup’ swtpm-0.8.1-build/swtpm-d2849a9f5ced70438d67036693438344b47b4161/src/swtpm_localca/swtpm_localca.c: scope_hint: In function ‘create_cert’ swtpm-0.8.1-build/swtpm-d2849a9f5ced70438d67036693438344b47b4161/src/swtpm_localca/swtpm_localca.c:19: included_from: Included from here. /usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null # 403| options = concat_arrays(options, (gchar *[]){"--add-header", NULL}, TRUE); # 404| # 405|-> if (strcmp(typ, "ek") == 0) { # 406| if (flags & ALLOW_SIGNING_F) # 407| options = concat_arrays(options, (gchar *[]){"--allow-signing", NULL}, TRUE); Error: CLANG_WARNING: [#def2] swtpm-0.8.1-build/swtpm-d2849a9f5ced70438d67036693438344b47b4161/src/swtpm_setup/swtpm_setup.c:404:21: warning[core.CallAndMessage]: 5th function call argument is an uninitialized value # 402| } # 403| # 404|-> if (certfile_move_or_delete(flags, !!(flags_to_certfiles[idx].flag & SETUP_EK_CERT_F), # 405| certfile, user_certsdir, key_description) != 0) # 406| return 1;
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-clang | 18.1.7 |
diffbase-analyzer-version-cppcheck | 2.14.2 |
diffbase-analyzer-version-gcc | 14.1.1 |
diffbase-analyzer-version-gcc-analyzer | 14.1.1 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-enabled-plugins | clang, cppcheck, gcc, shellcheck |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-7.us-west-2.compute.internal |
diffbase-mock-config | fedora-41-x86_64 |
diffbase-project-name | swtpm-0.9.0-1.fc41 |
diffbase-store-results-to | /tmp/tmpd5egy8vm/swtpm-0.9.0-1.fc41.tar.xz |
diffbase-time-created | 2024-07-03 18:10:17 |
diffbase-time-finished | 2024-07-03 18:11:59 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpd5egy8vm/swtpm-0.9.0-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpd5egy8vm/swtpm-0.9.0-1.fc41.src.rpm' |
diffbase-tool-version | csmock-3.5.3-1.el9 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-7.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | swtpm-0.8.1-5.fc40 |
store-results-to | /tmp/tmp5pus4pzq/swtpm-0.8.1-5.fc40.tar.xz |
time-created | 2024-07-03 18:07:54 |
time-finished | 2024-07-03 18:10:02 |
title | Fixed defects |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp5pus4pzq/swtpm-0.8.1-5.fc40.tar.xz' '--gcc-analyze' '/tmp/tmp5pus4pzq/swtpm-0.8.1-5.fc40.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |