at-spi2-core-2.54.0-1.fc42

List of Findings

Error: CPPCHECK_WARNING (CWE-758): [#def1]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/adaptors/collection-adaptor.c:644: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  642|         for (j = 0; j < 32; j++)
#  643|           {
#  644|->           if (array[i] & (1 << j))
#  645|               {
#  646|                 if (out_count == out_size - 2)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/adaptors/collection-adaptor.c: scope_hint: In function ‘read_mr’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/adaptors/collection-adaptor.c:716:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘q’
/usr/include/glib-2.0/glib/glist.h:34: included_from: Included from here.
/usr/include/glib-2.0/glib/ghash.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:52: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/redhat-linux-build/atk/atkversion.h:31: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/redhat-linux-build/atk/atk-enum-types.h:11: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk/atk.h:25: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/bridge.h:28: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/adaptors/collection-adaptor.c:28: included_from: Included from here.
/usr/include/glib-2.0/glib/gmem.h:318:57: note: in expansion of macro ‘_G_NEW’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/adaptors/collection-adaptor.c:703:22: note: in expansion of macro ‘g_new’
/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.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/adaptors/collection-adaptor.c:705:29: note: in expansion of macro ‘g_strdup’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/adaptors/collection-adaptor.c: scope_hint: In function ‘read_mr’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/adaptors/collection-adaptor.c:704:28: note: in expansion of macro ‘g_strdup’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/adaptors/collection-adaptor.c: scope_hint: In function ‘read_mr’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/adaptors/collection-adaptor.c:705:29: note: in expansion of macro ‘g_strdup’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/adaptors/collection-adaptor.c: scope_hint: In function ‘read_mr’
#  714|                   }
#  715|                 mrp->attributes = g_slist_prepend (mrp->attributes, attr);
#  716|->               if (*q == '\0')
#  717|                   break;
#  718|                 else

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/bridge.c: scope_hint: In function ‘add_property_to_event’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/bridge.c:205:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘evdata’
/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.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/redhat-linux-build/atk/atkversion.h:31: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/redhat-linux-build/atk/atk-enum-types.h:11: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk/atk.h:25: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/bridge.c:28: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/bridge.c:204:16: note: in expansion of macro ‘g_strdup’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/bridge.c: scope_hint: In function ‘add_property_to_event’
#  203|   
#  204|     prop->name = g_strdup (property);
#  205|->   evdata->properties = g_slist_append (evdata->properties, prop);
#  206|   }
#  207|   

Error: CPPCHECK_WARNING (CWE-758): [#def4]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/bridge.c:573: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  571|         for (j = 0; j < 32; j++)
#  572|           {
#  573|->           if (v & (1 << j))
#  574|               {
#  575|                 AtkState state = spi_atk_state_from_spi_state ((count << 5) + j);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def5]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/event.c: scope_hint: In function ‘ensure_proper_format’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/event.c:382:36: warning[-Wanalyzer-out-of-bounds]: buffer over-read
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/event.c:382:36: note: read of 21 bytes from after the end of ‘"org.a11y.atspi.Event.Object"’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/event.c:382:36: note: valid subscripts for ‘"org.a11y.atspi.Event.Object"’ are ‘[0]’ to ‘[27]’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/event.c:27: included_from: Included from here.
/usr/include/string.h:407:15: note: argument 1 of ‘strlen’ must be a pointer to a null-terminated string
#  380|   ensure_proper_format (const char *name)
#  381|   {
#  382|->   gchar *ret = (gchar *) g_malloc (strlen (name) * 2 + 2);
#  383|     gchar *p = ret;
#  384|     gboolean need_upper = TRUE;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def6]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/event.c: scope_hint: In function ‘signal_is_needed’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atk-adaptor/event.c:473:11: warning[-Wanalyzer-null-argument]: use of NULL ‘data[2]’ where non-null expected
/usr/include/string.h:293:15: note: argument 1 of ‘strcspn’ must be non-null
#  471|     /* Hack: events such as "object::text-changed::insert:system" as
#  472|        generated by Gecko */
#  473|->   data[2][strcspn (data[2], ":")] = '\0';
#  474|   
#  475|     for (list = spi_global_app_data->events; list; list = list->next)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def7]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-event-listener.c: scope_hint: In function ‘_atspi_send_event’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-event-listener.c:1055:12: warning[-Wanalyzer-null-argument]: use of NULL ‘category’ 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.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-accessible-private.h:29: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-event-listener.c:25: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-event-listener.c:393:14: note: in expansion of macro ‘g_strdup’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-event-listener.c: scope_hint: In function ‘_atspi_send_event’
/usr/include/glib-2.0/glib/galloca.h:35: included_from: Included from here.
/usr/include/glib-2.0/glib.h:32: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
# 1053|       {
# 1054|         EventListenerEntry *entry = l->data;
# 1055|->       if (!strcmp (category, entry->category) &&
# 1056|             (entry->name == NULL || !strcmp (name, entry->name)) &&
# 1057|             detail_matches_listener (detail, entry->detail) &&

Error: GCC_ANALYZER_WARNING (CWE-688): [#def8]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-event-listener.c:1056:36: warning[-Wanalyzer-null-argument]: use of NULL ‘name’ where non-null expected
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-event-listener.c:389:16: note: in expansion of macro ‘g_strdup’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-event-listener.c: scope_hint: In function ‘_atspi_send_event’
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
# 1054|         EventListenerEntry *entry = l->data;
# 1055|         if (!strcmp (category, entry->category) &&
# 1056|->           (entry->name == NULL || !strcmp (name, entry->name)) &&
# 1057|             detail_matches_listener (detail, entry->detail) &&
# 1058|             (entry->app == NULL || !strcmp (entry->app->parent.app->bus_name,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-misc.c: scope_hint: In function ‘ref_accessible’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-misc.c:451:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
/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/gobject/gbinding.h:30: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-device-listener.h:29: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-device-listener-private.h:28: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-private.h:28: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-misc.c:31: included_from: Included from here.
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-misc.c:416:18: note: in expansion of macro ‘g_strdup’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-misc.c: scope_hint: In function ‘ref_accessible’
#  449|     if (!strcmp (ref->path, "/org/a11y/atspi/accessible/root"))
#  450|       {
#  451|->       if (!app->root)
#  452|           {
#  453|             app->root = _atspi_accessible_new (app, atspi_path_root);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-misc.c:460:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-misc.c:416:18: note: in expansion of macro ‘g_strdup’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-misc.c: scope_hint: In function ‘ref_accessible’
#  458|       }
#  459|   
#  460|->   a = g_hash_table_lookup (app->hash, ref->path);
#  461|     if (a)
#  462|       {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-misc.c: scope_hint: In function ‘handle_remove_accessible’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-misc.c:526:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-misc.c:416:18: note: in expansion of macro ‘g_strdup’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/atspi/atspi-misc.c: scope_hint: In function ‘handle_remove_accessible’
#  524|       return DBUS_HANDLER_RESULT_HANDLED;
#  525|     g_object_run_dispose (G_OBJECT (a));
#  526|->   g_hash_table_remove (app->hash, a->parent.path);
#  527|     g_object_unref (a); /* unref our own ref */
#  528|     return DBUS_HANDLER_RESULT_HANDLED;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def12]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/bus/at-spi-bus-launcher.c: scope_hint: In function ‘ensure_a11y_bus_broker’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/bus/at-spi-bus-launcher.c:470:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘socket(1, 2049, 0)’
#  468|       g_error ("Failed to create listening socket: %s", strerror (errno));
#  469|   
#  470|->   if (bind (app->listenfd, (struct sockaddr *) &addr, addr_len) < 0)
#  471|       g_error ("Failed to bind listening socket: %s", strerror (errno));
#  472|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/bus/at-spi-bus-launcher.c:477:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*app.listenfd’
#  475|       g_error ("Failed to get socket name for listening socket: %s", strerror (errno));
#  476|   
#  477|->   if (listen (app->listenfd, 1024) < 0)
#  478|       g_error ("Failed to listen on socket: %s", strerror (errno));
#  479|   

Error: COMPILER_WARNING (CWE-252): [#def14]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/bus/at-spi-bus-launcher.c: scope_hint: In function ‘sigterm_handler’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/bus/at-spi-bus-launcher.c:866:3: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  866 |   write (sigterm_pipefd[1], "X", 1);
#      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  864|   sigterm_handler (int signum)
#  865|   {
#  866|->   write (sigterm_pipefd[1], "X", 1);
#  867|   }
#  868|   

Error: CPPCHECK_WARNING (CWE-758): [#def15]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/dbind/dbind-any.c:131: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement
#  129|       case '\0':
#  130|         g_assert_not_reached ();
#  131|->       break;
#  132|       default:
#  133|         return 1;

Error: CPPCHECK_WARNING (CWE-664): [#def16]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/dbind/dbind.c:266: error[va_end_missing]: va_list 'args_demarshal' was opened but not closed by va_end().
#  264|     msg = dbus_message_new_method_call (bus_name, path, interface, method);
#  265|     if (!msg)
#  266|->     return FALSE;
#  267|   
#  268|     p = arg_types;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/tests/at-spi2-atk/dummyatk/my-atk-table.c: scope_hint: In function ‘my_atk_table_test_table_get_row_extent_at’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/tests/at-spi2-atk/dummyatk/my-atk-table.c:251:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  249|     MyAtkTableCell *self = MY_ATK_TABLE_CELL (cell);
#  250|   
#  251|->   return self->row_span;
#  252|   }
#  253|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def18]
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/tests/at-spi2-atk/dummyatk/my-atk-table.c: scope_hint: In function ‘my_atk_table_test_table_get_column_extent_at’
at-spi2-core-2.54.0-build/at-spi2-core-2.54.0/tests/at-spi2-atk/dummyatk/my-atk-table.c:261:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  259|     MyAtkTableCell *self = MY_ATK_TABLE_CELL (cell);
#  260|   
#  261|->   return self->column_span;
#  262|   }
#  263|   

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-168.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-nameat-spi2-core-2.54.0-1.fc42
store-results-to/tmp/tmpsr5qachl/at-spi2-core-2.54.0-1.fc42.tar.xz
time-created2024-11-12 23:13:35
time-finished2024-11-12 23:15:47
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpsr5qachl/at-spi2-core-2.54.0-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpsr5qachl/at-spi2-core-2.54.0-1.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9