wayland-1.23.0-1.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
wayland-1.23.0-build/wayland-1.23.0/cursor/wayland-cursor.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
wayland-1.23.0-build/wayland-1.23.0/cursor/wayland-cursor.c: scope_hint: In function ‘wl_cursor_create_from_data’
wayland-1.23.0-build/wayland-1.23.0/cursor/wayland-cursor.c:239:16: warning[-Wanalyzer-malloc-leak]: leak of ‘cursor’
#  237|   	       cursor_data + metadata->offset, size);
#  238|   
#  239|-> 	return &cursor->cursor;
#  240|   
#  241|   err_free_image:

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
wayland-1.23.0-build/wayland-1.23.0/cursor/wayland-cursor.c: scope_hint: In function ‘wl_cursor_create_from_xcursor_images’
wayland-1.23.0-build/wayland-1.23.0/cursor/wayland-cursor.c:334:16: warning[-Wanalyzer-malloc-leak]: leak of ‘cursor’
#  332|   	}
#  333|   
#  334|-> 	return &cursor->cursor;
#  335|   }
#  336|   

Error: CPPCHECK_WARNING: [#def4]
wayland-1.23.0-build/wayland-1.23.0/cursor/xcursor.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def5]
wayland-1.23.0-build/wayland-1.23.0/cursor/xcursor.c: scope_hint: In function ‘load_all_cursors_from_dir’
wayland-1.23.0-build/wayland-1.23.0/cursor/xcursor.c:689:20: warning[-Wanalyzer-null-argument]: use of NULL ‘path’ where non-null expected
wayland-1.23.0-build/wayland-1.23.0/cursor/xcursor.c:32: included_from: Included from here.
/usr/include/dirent.h:141:13: note: argument 1 of ‘opendir’ must be non-null
#  687|   {
#  688|   	FILE *f;
#  689|-> 	DIR *dir = opendir(path);
#  690|   	struct dirent *ent;
#  691|   	char *full;

Error: CPPCHECK_WARNING: [#def6]
wayland-1.23.0-build/wayland-1.23.0/src/connection.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def7]
wayland-1.23.0-build/wayland-1.23.0/src/event-loop.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
wayland-1.23.0-build/wayland-1.23.0/src/event-loop.c: scope_hint: In function ‘wl_timer_heap_unreserve’
wayland-1.23.0-build/wayland-1.23.0/src/event-loop.c:369:31: warning[-Wanalyzer-malloc-leak]: leak of ‘*loop.timers.data’
#  367|   		}
#  368|   		timers->data = n;
#  369|-> 		timers->space = timers->space / 2;
#  370|   	}
#  371|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
wayland-1.23.0-build/wayland-1.23.0/src/event-loop.c: scope_hint: In function ‘wl_event_loop_add_signal’
wayland-1.23.0-build/wayland-1.23.0/src/event-loop.c:736:16: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 64)’
wayland-1.23.0-build/wayland-1.23.0/src/event-loop.c: scope_hint: In function ‘wl_event_loop_add_signal’
#  734|   	source->func = func;
#  735|   
#  736|-> 	return add_source(loop, &source->base, WL_EVENT_READABLE, data);
#  737|   }
#  738|   

Error: CPPCHECK_WARNING: [#def10]
wayland-1.23.0-build/wayland-1.23.0/src/scanner.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def11]
wayland-1.23.0-build/wayland-1.23.0/src/scanner.c:286:22: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  284|   xstrdup(const char *s)
#  285|   {
#  286|-> 	return fail_on_null(strdup(s));
#  287|   }
#  288|   

Error: CLANG_WARNING: [#def12]
wayland-1.23.0-build/wayland-1.23.0/src/scanner.c:461:6: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  459|   set_arg_type(struct arg *arg, const char *type)
#  460|   {
#  461|-> 	if (strcmp(type, "int") == 0)
#  462|   		arg->type = INT;
#  463|   	else if (strcmp(type, "uint") == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
wayland-1.23.0-build/wayland-1.23.0/src/scanner.c: scope_hint: In function ‘end_element.part.0’
wayland-1.23.0-build/wayland-1.23.0/src/scanner.c:1040:34: warning[-Wanalyzer-malloc-leak]: leak of ‘strndup(&*(struct parse_context *)data.character_data, (long unsigned int)*(struct parse_context *)data.character_data_length)’
# 1038|   			strndup(ctx->character_data,
# 1039|   				ctx->character_data_length);
# 1040|-> 		ctx->description = NULL;
# 1041|   	} else if (strcmp(name, "request") == 0 ||
# 1042|   		   strcmp(name, "event") == 0) {

Error: CPPCHECK_WARNING: [#def14]
wayland-1.23.0-build/wayland-1.23.0/src/wayland-client.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def15]
wayland-1.23.0-build/wayland-1.23.0/src/wayland-client.c:1615:17: warning[core.NullDereference]: Dereference of null pointer
# 1613|   		wl_abort("Tried to add event to destroyed queue\n");
# 1614|   
# 1615|-> 	wl_list_insert(queue->event_list.prev, &closure->link);
# 1616|   
# 1617|   	return size;

Error: CPPCHECK_WARNING: [#def16]
wayland-1.23.0-build/wayland-1.23.0/src/wayland-server.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def17]
wayland-1.23.0-build/wayland-1.23.0/src/wayland-server.c:481:22: warning[unix.Malloc]: Use of memory after it is freed
#  479|   wl_client_flush(struct wl_client *client)
#  480|   {
#  481|-> 	wl_connection_flush(client->connection);
#  482|   }
#  483|   

Error: CLANG_WARNING: [#def18]
wayland-1.23.0-build/wayland-1.23.0/src/wayland-server.c:949:17: warning[unix.Malloc]: Use of memory after it is freed
#  947|   	/* wl_client_destroy() should not be called twice for the same client. */
#  948|   	if (wl_list_empty(&client->link)) {
#  949|-> 		client->error = 1;
#  950|   		wl_log("wl_client_destroy: encountered re-entrant client destruction.\n");
#  951|   		return;

Error: CLANG_WARNING: [#def19]
wayland-1.23.0-build/wayland-1.23.0/src/wayland-server.c:1542:2: warning[unix.Malloc]: Use of memory after it is freed
# 1540|   	int ret;
# 1541|   
# 1542|-> 	wl_list_for_each_safe(client, next, &display->client_list, link) {
# 1543|   		ret = wl_connection_flush(client->connection);
# 1544|   		if (ret < 0 && errno == EAGAIN) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def20]
wayland-1.23.0-build/wayland-1.23.0/src/wayland-server.c: scope_hint: In function ‘_wl_display_add_socket’
wayland-1.23.0-build/wayland-1.23.0/src/wayland-server.c:1749:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*s.fd’
# 1747|   	}
# 1748|   
# 1749|-> 	if (listen(s->fd, 128) < 0) {
# 1750|   		wl_log("listen() failed with error: %s\n", strerror(errno));
# 1751|   		return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
wayland-1.23.0-build/wayland-1.23.0/src/wayland-server.c:1750:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor
wayland-1.23.0-build/wayland-1.23.0/src/wayland-server.c:40: included_from: Included from here.
wayland-1.23.0-build/wayland-1.23.0/src/wayland-server.c:34: included_from: Included from here.
# 1748|   
# 1749|   	if (listen(s->fd, 128) < 0) {
# 1750|-> 		wl_log("listen() failed with error: %s\n", strerror(errno));
# 1751|   		return -1;
# 1752|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
wayland-1.23.0-build/wayland-1.23.0/src/wayland-server.c: scope_hint: In function ‘wl_display_add_socket_fd’
wayland-1.23.0-build/wayland-1.23.0/src/wayland-server.c:1846:9: warning[-Wanalyzer-malloc-leak]: leak of ‘wl_socket_alloc()’
wayland-1.23.0-build/wayland-1.23.0/src/wayland-server.c: scope_hint: In function ‘wl_display_add_socket_fd’
# 1844|   	s->fd = sock_fd;
# 1845|   
# 1846|-> 	wl_list_insert(display->socket_list.prev, &s->link);
# 1847|   
# 1848|   	return 0;

Error: CLANG_WARNING: [#def23]
wayland-1.23.0-build/wayland-1.23.0/src/wayland-server.c:2472:9: warning[unix.Malloc]: Use of memory after it is freed
# 2470|   	 * ones that don't. */
# 2471|   	while (!wl_list_empty(&signal->listener_list)) {
# 2472|-> 		pos = signal->listener_list.next;
# 2473|   		l = wl_container_of(pos, l, link);
# 2474|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
wayland-1.23.0-build/wayland-1.23.0/src/wayland-shm.c: scope_hint: In function ‘wl_shm_buffer_begin_access’
wayland-1.23.0-build/wayland-1.23.0/src/wayland-shm.c:665:34: warning[-Wanalyzer-malloc-leak]: leak of ‘sigbus_data’
wayland-1.23.0-build/wayland-1.23.0/src/wayland-shm.c: scope_hint: In function ‘wl_shm_buffer_begin_access’
wayland-1.23.0-build/wayland-1.23.0/src/wayland-shm.c:43: included_from: Included from here.
#  663|   
#  664|   	sigbus_data->current_pool = pool;
#  665|-> 	sigbus_data->access_count++;
#  666|   }
#  667|   

Error: CPPCHECK_WARNING: [#def25]
wayland-1.23.0-build/wayland-1.23.0/src/wayland-util.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-476): [#def26]
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c:78: warning[nullPointer]: Possible null pointer dereference: null
#   76|   
#   77|   	test_disable_coredumps();
#   78|-> 	*null = "Goodbye, world";
#   79|   }
#   80|   

Error: CLANG_WARNING: [#def27]
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c:78:8: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'null')
#   76|   
#   77|   	test_disable_coredumps();
#   78|-> 	*null = "Goodbye, world";
#   79|   }
#   80|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def28]
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c: scope_hint: In function ‘fail_segv’
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c:78:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#   76|   
#   77|   	test_disable_coredumps();
#   78|-> 	*null = "Goodbye, world";
#   79|   }
#   80|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def29]
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c: scope_hint: In function ‘sanity_fd_leak’
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c:99:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
#   97|   
#   98|   	test_disable_coredumps();
#   99|-> }
#  100|   
#  101|   FAIL_TEST(sanity_fd_leak_exec)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def30]
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c:99:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
#   97|   
#   98|   	test_disable_coredumps();
#   99|-> }
#  100|   
#  101|   FAIL_TEST(sanity_fd_leak_exec)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def31]
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c: scope_hint: In function ‘sanity_fd_leak_exec’
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c:112:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
#  110|   	test_disable_coredumps();
#  111|   	exec_fd_leak_check(nr_fds);
#  112|-> }
#  113|   
#  114|   TEST(sanity_fd_exec)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def32]
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c: scope_hint: In function ‘sanity_fd_leak_exec’
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c:112:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
#  110|   	test_disable_coredumps();
#  111|   	exec_fd_leak_check(nr_fds);
#  112|-> }
#  113|   
#  114|   TEST(sanity_fd_exec)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def33]
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c: scope_hint: In function ‘sanity_fd_exec’
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c:123:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[0]’
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c:27: included_from: Included from here.
#  121|   
#  122|   	exec_fd_leak_check(nr_fds + 2);
#  123|-> }
#  124|   
#  125|   static void

Error: GCC_ANALYZER_WARNING (CWE-775): [#def34]
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c: scope_hint: In function ‘sanity_fd_exec’
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c:123:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd[1]’
#  121|   
#  122|   	exec_fd_leak_check(nr_fds + 2);
#  123|-> }
#  124|   
#  125|   static void

Error: CLANG_WARNING: [#def35]
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c:203:25: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  201|   	char *log;
#  202|   	size_t log_len;
#  203|-> 	char *wayland_socket = strdup(getenv("WAYLAND_SOCKET"));
#  204|   	char *xdg_runtime_dir = strdup(getenv("XDG_RUNTIME_DIR"));
#  205|   

Error: CLANG_WARNING: [#def36]
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c:204:26: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  202|   	size_t log_len;
#  203|   	char *wayland_socket = strdup(getenv("WAYLAND_SOCKET"));
#  204|-> 	char *xdg_runtime_dir = strdup(getenv("XDG_RUNTIME_DIR"));
#  205|   
#  206|   	unsetenv("WAYLAND_SOCKET");

Error: GCC_ANALYZER_WARNING (CWE-688): [#def37]
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c: scope_hint: In function ‘sanity_client_log’
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c:221:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘xdg_runtime_dir’ where non-null expected
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c:26: included_from: Included from here.
/usr/include/stdlib.h:792:12: note: argument 2 of ‘setenv’ must be non-null
#  219|   	 * leak checker cares about the value of WAYLAND_SOCKET during teardown for
#  220|   	 * correct fd accounting. */
#  221|-> 	setenv("XDG_RUNTIME_DIR", xdg_runtime_dir, 0);
#  222|   	setenv("WAYLAND_SOCKET", wayland_socket, 0);
#  223|   	free(xdg_runtime_dir);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def38]
wayland-1.23.0-build/wayland-1.23.0/tests/sanity-test.c:222:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘wayland_socket’ where non-null expected
/usr/include/stdlib.h:792:12: note: argument 2 of ‘setenv’ must be non-null
#  220|   	 * correct fd accounting. */
#  221|   	setenv("XDG_RUNTIME_DIR", xdg_runtime_dir, 0);
#  222|-> 	setenv("WAYLAND_SOCKET", wayland_socket, 0);
#  223|   	free(xdg_runtime_dir);
#  224|   	free(wayland_socket);

Error: CLANG_WARNING: [#def39]
wayland-1.23.0-build/wayland-1.23.0/tests/socket-test.c:170:3: warning[deadcode.DeadStores]: Value stored to 'len' is never read
#  168|   
#  169|   		/* is the name sequential? */
#  170|-> 		len = snprintf(path, sizeof example_sockaddr_un.sun_path,
#  171|   			       "wayland-%d", i);
#  172|   		assert(strcmp(name, path) == 0);

Error: CPPCHECK_WARNING (CWE-401): [#def40]
wayland-1.23.0-build/wayland-1.23.0/tests/socket-test.c:216: error[memleak]: Memory leak: destroy_listener
#  214|   	destroy_listener->listener.notify = client_destroy_notify;
#  215|   	wl_client_add_destroy_listener(client, &destroy_listener->listener);
#  216|-> }
#  217|   
#  218|   TEST(absolute_socket_path)

Error: CPPCHECK_WARNING (CWE-401): [#def41]
wayland-1.23.0-build/wayland-1.23.0/tests/test-compositor.c:332: error[memleak]: Memory leak: wfr
#  330|   	if (d->wfr_num == num)
#  331|   		wl_display_terminate(d->wl_display);
#  332|-> }
#  333|   
#  334|   static void

Error: CPPCHECK_WARNING: [#def42]
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-570): [#def43]
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:73: error[comparePointers]: Comparing pointers that point to different objects
#   71|   	const struct test *t;
#   72|   
#   73|-> 	for (t = &__start_test_section; t < &__stop_test_section; t++)
#   74|   		if (strcmp(t->name, name) == 0)
#   75|   			return t;

Error: CPPCHECK_WARNING (CWE-570): [#def44]
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:90: error[comparePointers]: Comparing pointers that point to different objects
#   88|   		name);
#   89|   
#   90|-> 	for (t = &__start_test_section; t < &__stop_test_section; t++)
#   91|   		fprintf(stderr, "  %s\n", t->name);
#   92|   

Error: CLANG_WARNING: [#def45]
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:159:2: warning[core.NullDereference]: Access to field 'run' results in a dereference of a null pointer (loaded from variable 't')
#  157|   	cur_fds = count_open_fds();
#  158|   
#  159|-> 	t->run();
#  160|   
#  161|   	/* turn off timeout (if any) after test completion */

Error: GCC_ANALYZER_WARNING (CWE-126): [#def46]
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c: scope_hint: In function ‘run_test’
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:159:10: warning[-Wanalyzer-out-of-bounds]: buffer over-read
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:36: included_from: Included from here.
/usr/include/stdlib.h:41: included_from: Included from here.
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:31: included_from: Included from here.
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:159:10: note: read of 8 bytes from after the end of ‘__start_test_section’
#                                                        └─────────────────────────────────────────┘
#                                                                             ^
#  157|   	cur_fds = count_open_fds();
#  158|   
#  159|-> 	t->run();
#  160|   
#  161|   	/* turn off timeout (if any) after test completion */

Error: COMPILER_WARNING (CWE-252): [#def47]
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c: scope_hint: In function ‘is_debugger_attached’
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:275:17: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  275 |                 read(pipefd[0], &buf, 1);
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
#  273|   		/* Wait until parent is ready */
#  274|   		close(pipefd[1]);  /* Close unused write end */
#  275|-> 		read(pipefd[0], &buf, 1);
#  276|   		close(pipefd[0]);
#  277|   		if (buf == '-')

Error: COMPILER_WARNING (CWE-252): [#def48]
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:298:25: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  298 |                         write(pipefd[1], "-", 1);
#      |                         ^~~~~~~~~~~~~~~~~~~~~~~~
#  296|   			 */
#  297|   			perror("prctl");
#  298|-> 			write(pipefd[1], "-", 1);
#  299|   		} else {
#  300|   			/* Signal to client that parent is ready by passing '+' */

Error: COMPILER_WARNING (CWE-252): [#def49]
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:301:25: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  301 |                         write(pipefd[1], "+", 1);
#      |                         ^~~~~~~~~~~~~~~~~~~~~~~~
#  299|   		} else {
#  300|   			/* Signal to client that parent is ready by passing '+' */
#  301|-> 			write(pipefd[1], "+", 1);
#  302|   		}
#  303|   		close(pipefd[1]);

Error: CPPCHECK_WARNING (CWE-570): [#def50]
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:359: error[comparePointers]: Comparing pointers that point to different objects
#  357|   
#  358|   	pass = 0;
#  359|-> 	for (t = &__start_test_section; t < &__stop_test_section; t++) {
#  360|   		int success = 0;
#  361|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def51]
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c: scope_hint: In function ‘main’
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:379:45: warning[-Wanalyzer-out-of-bounds]: buffer over-read
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:379:45: note: read of 4 bytes from after the end of ‘__start_test_section’
#                                                        └───────────────────────┘
#                                                                    ^
#  377|   		if (WIFEXITED(info)) {
#  378|   			if (WEXITSTATUS(info) == EXIT_SUCCESS)
#  379|-> 				success = !t->must_fail;
#  380|   			else
#  381|   				success = t->must_fail;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def52]
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:381:41: warning[-Wanalyzer-out-of-bounds]: buffer over-read
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:381:41: note: read of 4 bytes from after the end of ‘__start_test_section’
#                                                        └───────────────────────┘
#                                                                    ^
#  379|   				success = !t->must_fail;
#  380|   			else
#  381|-> 				success = t->must_fail;
#  382|   
#  383|   			stderr_set_color(success ? GREEN : RED);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def53]
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:385:34: warning[-Wanalyzer-out-of-bounds]: buffer over-read
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:385:34: note: read of 8 bytes from after the end of ‘__start_test_section’
#                                                      └────────────────────────────────┘
#                                                                      ^
#  383|   			stderr_set_color(success ? GREEN : RED);
#  384|   			fprintf(stderr, "test \"%s\":\texit status %d",
#  385|-> 				t->name, WEXITSTATUS(info));
#  386|   
#  387|   		} else if (WIFSIGNALED(info)) {

Error: GCC_ANALYZER_WARNING (CWE-126): [#def54]
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:388:30: warning[-Wanalyzer-out-of-bounds]: buffer over-read
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:388:30: note: read of 4 bytes from after the end of ‘__start_test_section’
#                                                        └───────────────────────┘
#                                                                    ^
#  386|   
#  387|   		} else if (WIFSIGNALED(info)) {
#  388|-> 			if (t->must_fail)
#  389|   				success = 1;
#  390|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def55]
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:393:34: warning[-Wanalyzer-out-of-bounds]: buffer over-read
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:393:34: note: read of 8 bytes from after the end of ‘__start_test_section’
#                                                      └────────────────────────────────┘
#                                                                      ^
#  391|   			stderr_set_color(success ? GREEN : RED);
#  392|   			fprintf(stderr, "test \"%s\":\tsignal %d",
#  393|-> 				t->name, WTERMSIG(info));
#  394|   		}
#  395|   

Error: CPPCHECK_WARNING (CWE-570): [#def56]
wayland-1.23.0-build/wayland-1.23.0/tests/test-runner.c:408: error[subtractPointers]: Subtracting pointers that point to different objects
#  406|   	}
#  407|   
#  408|-> 	total = &__stop_test_section - &__start_test_section;
#  409|   	fprintf(stderr, "%d tests, %d pass, %d fail\n",
#  410|   		total, pass, total - pass);

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-5.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namewayland-1.23.0-1.fc41
store-results-to/tmp/tmpj_vuww_5/wayland-1.23.0-1.fc41.tar.xz
time-created2024-07-03 18:19:30
time-finished2024-07-03 18:20:50
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpj_vuww_5/wayland-1.23.0-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpj_vuww_5/wayland-1.23.0-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9