Error: GCC_ANALYZER_WARNING (CWE-476): [#def1] libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.c: scope_hint: In function ‘jcat_item_get_blob_by_kind’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.c:256:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ /usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here. /usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here. /usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here. /usr/include/glib-2.0/glib.h:32: included_from: Included from here. /usr/include/glib-2.0/gobject/gbinding.h:30: included_from: Included from here. /usr/include/glib-2.0/glib-object.h:24: included_from: Included from here. /usr/include/json-glib-1.0/json-glib/json-types.h:32: included_from: Included from here. /usr/include/json-glib-1.0/json-glib/json-glib.h:29: included_from: Included from here. libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-blob-private.h:9: included_from: Included from here. libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.c:9: included_from: Included from here. /usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.c:252:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/gobject/gobject.h:26: included_from: Included from here. /usr/include/glib-2.0/gobject/gbinding.h:31: included_from: Included from here. /usr/include/glib-2.0/gobject/gtype.h:1719:40: note: in definition of macro ‘G_DECLARE_DERIVABLE_TYPE’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ /usr/include/glib-2.0/gobject/gtype.h:1720:12: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.h:15:1: note: in expansion of macro ‘G_DECLARE_DERIVABLE_TYPE’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ /usr/include/glib-2.0/gobject/gtype.h:1720:12: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.h:15:1: note: in expansion of macro ‘G_DECLARE_DERIVABLE_TYPE’ /usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.c:252:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.c:252:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.c:253:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.c:253:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.c:224:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/gobject/gtype.h:1719:40: note: in definition of macro ‘G_DECLARE_DERIVABLE_TYPE’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ /usr/include/glib-2.0/gobject/gtype.h:1720:12: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.h:15:1: note: in expansion of macro ‘G_DECLARE_DERIVABLE_TYPE’ /usr/include/glib-2.0/gobject/gtype.h:541:66: note: in expansion of macro ‘_G_TYPE_CIT’ /usr/include/glib-2.0/gobject/gtype.h:1720:12: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_TYPE’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.h:15:1: note: in expansion of macro ‘G_DECLARE_DERIVABLE_TYPE’ /usr/include/glib-2.0/glib/gmacros.h:1243:8: note: in definition of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.c:224:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.c:224:9: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/glib-2.0/glib.h:64: included_from: Included from here. libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-item.c:224:9: note: in expansion of macro ‘g_return_val_if_fail’ # 254| # 255| target_blobs = jcat_item_get_blobs_by_kind(self, kind); # 256|-> if (target_blobs->len == 0) { # 257| g_set_error(error, # 258| G_IO_ERROR, Error: GCC_ANALYZER_WARNING (CWE-688): [#def2] libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-tool.c: scope_hint: In function ‘jcat_tool_import’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-tool.c:355:16: warning[-Wanalyzer-null-argument]: use of NULL 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. /usr/include/glib-2.0/glib/gi18n.h:23: included_from: Included from here. libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-tool.c:11: included_from: Included from here. libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-tool.c:304:13: note: in expansion of macro ‘g_str_has_suffix’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-tool.c:265:16: note: in expansion of macro ‘g_strdup’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-tool.c:22: included_from: Included from here. libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-file.h:59:1: note: argument 2 of ‘jcat_file_get_item_by_id’ must be non-null # 353| /* sign the file using the engine */ # 354| id_safe = jcat_tool_import_convert_id_safe(priv, values[1]); # 355|-> item = jcat_file_get_item_by_id(file, id_safe, NULL); # 356| if (item == NULL) { # 357| item = jcat_item_new(id_safe); Error: GCC_ANALYZER_WARNING (CWE-688): [#def3] libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-tool.c: scope_hint: In function ‘jcat_tool_self_sign’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-tool.c:403:16: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-tool.c:265:16: note: in expansion of macro ‘g_strdup’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-file.h:59:1: note: argument 2 of ‘jcat_file_get_item_by_id’ must be non-null # 401| /* create item if required */ # 402| id_safe = jcat_tool_import_convert_id_safe(priv, values[1]); # 403|-> item = jcat_file_get_item_by_id(file, id_safe, NULL); # 404| if (item == NULL) { # 405| item = jcat_item_new(id_safe); Error: GCC_ANALYZER_WARNING (CWE-688): [#def4] libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-tool.c: scope_hint: In function ‘jcat_tool_sign’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-tool.c:477:16: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-tool.c:265:16: note: in expansion of macro ‘g_strdup’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-file.h:59:1: note: argument 2 of ‘jcat_file_get_item_by_id’ must be non-null # 475| /* create item if required */ # 476| id_safe = jcat_tool_import_convert_id_safe(priv, values[1]); # 477|-> item = jcat_file_get_item_by_id(file, id_safe, NULL); # 478| if (item == NULL) { # 479| item = jcat_item_new(id_safe); Error: GCC_ANALYZER_WARNING (CWE-688): [#def5] libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-tool.c: scope_hint: In function ‘jcat_tool_verify’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-tool.c:714:24: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-tool.c:265:16: note: in expansion of macro ‘g_strdup’ libjcat-0.2.2-build/libjcat-0.2.2/libjcat/jcat-file.h:59:1: note: argument 2 of ‘jcat_file_get_item_by_id’ must be non-null # 712| g_autoptr(JcatItem) item = NULL; # 713| g_autofree gchar *id_safe = jcat_tool_import_convert_id_safe(priv, values[1]); # 714|-> item = jcat_file_get_item_by_id(file, id_safe, error); # 715| if (item == NULL) # 716| return FALSE;
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
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-98.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | libjcat-0.2.2-1.fc42 |
store-results-to | /tmp/tmp09dhe1kh/libjcat-0.2.2-1.fc42.tar.xz |
time-created | 2024-11-13 01:28:01 |
time-finished | 2024-11-13 01:29:59 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp09dhe1kh/libjcat-0.2.2-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp09dhe1kh/libjcat-0.2.2-1.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |