alsa-lib-1.2.14-2.fc43

List of Findings

Error: CPPCHECK_WARNING (CWE-476): [#def1]
alsa-lib-1.2.14/aserver/aserver.c:874: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: client
#  872|    found:
#  873|   	client = calloc(1, sizeof(*client));
#  874|-> 	client->local = 0;
#  875|   	client->poll_fd = pdata->fd;
#  876|   	client->ctrl_fd = waiter->fd;

Error: CPPCHECK_WARNING (CWE-476): [#def2]
alsa-lib-1.2.14/aserver/aserver.c:875: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: client
#  873|   	client = calloc(1, sizeof(*client));
#  874|   	client->local = 0;
#  875|-> 	client->poll_fd = pdata->fd;
#  876|   	client->ctrl_fd = waiter->fd;
#  877|   	add_waiter(client->ctrl_fd, POLLIN | POLLHUP, client_ctrl_handler, client);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
alsa-lib-1.2.14/aserver/aserver.c:875:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘client’
alsa-lib-1.2.14/aserver/aserver.c:836:12: enter_function: entry to ‘inet_pending_handler’
alsa-lib-1.2.14/aserver/aserver.c:856:9: call_function: calling ‘del_waiter’ from ‘inet_pending_handler’
alsa-lib-1.2.14/aserver/aserver.c:856:9: return_function: returning to ‘inet_pending_handler’ from ‘del_waiter’
alsa-lib-1.2.14/aserver/aserver.c:857:12: branch_false: following ‘false’ branch (when ‘remove == 0’)...
alsa-lib-1.2.14/aserver/aserver.c:864:9: branch_false: ...to here
alsa-lib-1.2.14/aserver/aserver.c:864:9: branch_true: following ‘true’ branch...
alsa-lib-1.2.14/aserver/aserver.c:866:21: branch_true: ...to here
alsa-lib-1.2.14/aserver/aserver.c:866:20: branch_true: following ‘true’ branch...
alsa-lib-1.2.14/aserver/aserver.c:867:25: branch_true: ...to here
alsa-lib-1.2.14/aserver/aserver.c:873:18: acquire_memory: this call could return NULL
alsa-lib-1.2.14/aserver/aserver.c:875:9: danger: ‘client’ could be NULL: unchecked value from [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
#  873|   	client = calloc(1, sizeof(*client));
#  874|   	client->local = 0;
#  875|-> 	client->poll_fd = pdata->fd;
#  876|   	client->ctrl_fd = waiter->fd;
#  877|   	add_waiter(client->ctrl_fd, POLLIN | POLLHUP, client_ctrl_handler, client);

Error: CPPCHECK_WARNING (CWE-476): [#def4]
alsa-lib-1.2.14/aserver/aserver.c:876: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: client
#  874|   	client->local = 0;
#  875|   	client->poll_fd = pdata->fd;
#  876|-> 	client->ctrl_fd = waiter->fd;
#  877|   	add_waiter(client->ctrl_fd, POLLIN | POLLHUP, client_ctrl_handler, client);
#  878|   	add_waiter(client->poll_fd, POLLHUP, client_poll_handler, client);

Error: CPPCHECK_WARNING (CWE-476): [#def5]
alsa-lib-1.2.14/aserver/aserver.c:877: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: client
#  875|   	client->poll_fd = pdata->fd;
#  876|   	client->ctrl_fd = waiter->fd;
#  877|-> 	add_waiter(client->ctrl_fd, POLLIN | POLLHUP, client_ctrl_handler, client);
#  878|   	add_waiter(client->poll_fd, POLLHUP, client_poll_handler, client);
#  879|   	client->open = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def6]
alsa-lib-1.2.14/aserver/aserver.c:878: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: client
#  876|   	client->ctrl_fd = waiter->fd;
#  877|   	add_waiter(client->ctrl_fd, POLLIN | POLLHUP, client_ctrl_handler, client);
#  878|-> 	add_waiter(client->poll_fd, POLLHUP, client_poll_handler, client);
#  879|   	client->open = 0;
#  880|   	list_add_tail(&client->list, &clients);

Error: CPPCHECK_WARNING (CWE-476): [#def7]
alsa-lib-1.2.14/aserver/aserver.c:879: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: client
#  877|   	add_waiter(client->ctrl_fd, POLLIN | POLLHUP, client_ctrl_handler, client);
#  878|   	add_waiter(client->poll_fd, POLLHUP, client_poll_handler, client);
#  879|-> 	client->open = 0;
#  880|   	list_add_tail(&client->list, &clients);
#  881|   	list_del(&pending->list);

Error: CPPCHECK_WARNING (CWE-476): [#def8]
alsa-lib-1.2.14/aserver/aserver.c:898: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: client
#  896|   	} else {
#  897|   		client_t *client = calloc(1, sizeof(*client));
#  898|-> 		client->ctrl_fd = sock;
#  899|   		client->local = 1;
#  900|   		client->open = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
alsa-lib-1.2.14/aserver/aserver.c:898:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘client’
alsa-lib-1.2.14/aserver/aserver.c:892:12: branch_false: following ‘false’ branch...
alsa-lib-1.2.14/aserver/aserver.c:897:36: branch_false: ...to here
alsa-lib-1.2.14/aserver/aserver.c:897:36: acquire_memory: this call could return NULL
alsa-lib-1.2.14/aserver/aserver.c:898:17: danger: ‘client’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  896|   	} else {
#  897|   		client_t *client = calloc(1, sizeof(*client));
#  898|-> 		client->ctrl_fd = sock;
#  899|   		client->local = 1;
#  900|   		client->open = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def10]
alsa-lib-1.2.14/aserver/aserver.c:899: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: client
#  897|   		client_t *client = calloc(1, sizeof(*client));
#  898|   		client->ctrl_fd = sock;
#  899|-> 		client->local = 1;
#  900|   		client->open = 0;
#  901|   		add_waiter(sock, POLLIN | POLLHUP, client_ctrl_handler, client);

Error: CPPCHECK_WARNING (CWE-476): [#def11]
alsa-lib-1.2.14/aserver/aserver.c:900: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: client
#  898|   		client->ctrl_fd = sock;
#  899|   		client->local = 1;
#  900|-> 		client->open = 0;
#  901|   		add_waiter(sock, POLLIN | POLLHUP, client_ctrl_handler, client);
#  902|   		list_add_tail(&client->list, &clients);

Error: CPPCHECK_WARNING (CWE-476): [#def12]
alsa-lib-1.2.14/aserver/aserver.c:917: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pending
#  915|   	} else {
#  916|   		inet_pending_t *pending = calloc(1, sizeof(*pending));
#  917|-> 		pending->fd = sock;
#  918|   		pending->cookie = 0;
#  919|   		add_waiter(sock, POLLIN, inet_pending_handler, pending);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
alsa-lib-1.2.14/aserver/aserver.c:917:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘pending’
alsa-lib-1.2.14/aserver/aserver.c:911:12: branch_false: following ‘false’ branch...
alsa-lib-1.2.14/aserver/aserver.c:916:43: branch_false: ...to here
alsa-lib-1.2.14/aserver/aserver.c:916:43: acquire_memory: this call could return NULL
alsa-lib-1.2.14/aserver/aserver.c:917:17: danger: ‘pending’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  915|   	} else {
#  916|   		inet_pending_t *pending = calloc(1, sizeof(*pending));
#  917|-> 		pending->fd = sock;
#  918|   		pending->cookie = 0;
#  919|   		add_waiter(sock, POLLIN, inet_pending_handler, pending);

Error: CPPCHECK_WARNING (CWE-476): [#def14]
alsa-lib-1.2.14/aserver/aserver.c:918: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pending
#  916|   		inet_pending_t *pending = calloc(1, sizeof(*pending));
#  917|   		pending->fd = sock;
#  918|-> 		pending->cookie = 0;
#  919|   		add_waiter(sock, POLLIN, inet_pending_handler, pending);
#  920|   		list_add_tail(&pending->list, &inet_pendings);

Error: COMPILER_WARNING: [#def15]
alsa-lib-1.2.14/src/pcm/pcm_local.h:40: included_from: Included from here.
alsa-lib-1.2.14/src/pcm/pcm.c:671: included_from: Included from here.
alsa-lib-1.2.14/include/local.h:323:21: warning[-Wunused-const-variable=]: '__evoke_link_warning__snd_pcm_boundary' defined but not used
#  323 |   static const char __evoke_link_warning_##symbol[]     \
#      |                     ^~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.14/src/pcm/pcm.c:7788:1: note: in expansion of macro 'link_warning'
# 7788 | link_warning(_snd_pcm_boundary, "Warning: _snd_pcm_boundary() is deprecated, consider to use snd_pcm_sw_params_current()");
#      | ^~~~~~~~~~~~
#  321|   #   define link_warning(symbol, msg) \
#  322|     __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
#  323|->   static const char __evoke_link_warning_##symbol[]	\
#  324|       __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
#  325|   #  endif

Error: COMPILER_WARNING: [#def16]
alsa-lib-1.2.14/include/local.h:323:21: warning[-Wunused-const-variable=]: '__evoke_link_warning__snd_pcm_mmap_hw_ptr' defined but not used
#  323 |   static const char __evoke_link_warning_##symbol[]     \
#      |                     ^~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.14/src/pcm/pcm.c:7787:1: note: in expansion of macro 'link_warning'
# 7787 | link_warning(_snd_pcm_mmap_hw_ptr, "Warning: _snd_pcm_mmap_hw_ptr() is deprecated, consider to not use this function");
#      | ^~~~~~~~~~~~
#  321|   #   define link_warning(symbol, msg) \
#  322|     __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
#  323|->   static const char __evoke_link_warning_##symbol[]	\
#  324|       __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
#  325|   #  endif

Error: COMPILER_WARNING: [#def17]
alsa-lib-1.2.14/src/control/control_local.h:22: included_from: Included from here.
alsa-lib-1.2.14/src/control/control.c:188: included_from: Included from here.
alsa-lib-1.2.14/include/local.h:323:21: warning[-Wunused-const-variable=]: '__evoke_link_warning_snd_ctl_elem_info_is_indirect' defined but not used
#  323 |   static const char __evoke_link_warning_##symbol[]     \
#      |                     ^~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.14/src/control/control.c:2746:1: note: in expansion of macro 'link_warning'
# 2746 | link_warning(snd_ctl_elem_info_is_indirect, "Warning: snd_ctl_elem_info_is_indirect is deprecated, do not use it");
#      | ^~~~~~~~~~~~
#  321|   #   define link_warning(symbol, msg) \
#  322|     __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
#  323|->   static const char __evoke_link_warning_##symbol[]	\
#  324|       __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
#  325|   #  endif

Error: COMPILER_WARNING: [#def18]
alsa-lib-1.2.14/include/local.h:323:21: warning[-Wunused-const-variable=]: '__evoke_link_warning_snd_names_list' defined but not used
#  323 |   static const char __evoke_link_warning_##symbol[]     \
#      |                     ^~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.14/src/names.c:47:1: note: in expansion of macro 'link_warning'
#   47 | link_warning(snd_names_list, "Warning: snd_names_list is deprecated, use snd_device_name_hint");
#      | ^~~~~~~~~~~~
#  321|   #   define link_warning(symbol, msg) \
#  322|     __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
#  323|->   static const char __evoke_link_warning_##symbol[]	\
#  324|       __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
#  325|   #  endif

Error: COMPILER_WARNING: [#def19]
alsa-lib-1.2.14/src/names.c:33: included_from: Included from here.
alsa-lib-1.2.14/include/local.h:323:21: warning[-Wunused-const-variable=]: '__evoke_link_warning_snd_names_list_free' defined but not used
#  323 |   static const char __evoke_link_warning_##symbol[]     \
#      |                     ^~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.14/src/names.c:56:1: note: in expansion of macro 'link_warning'
#   56 | link_warning(snd_names_list_free, "Warning: snd_names_list_free is deprecated, use snd_device_name_free_hint");
#      | ^~~~~~~~~~~~
#  321|   #   define link_warning(symbol, msg) \
#  322|     __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
#  323|->   static const char __evoke_link_warning_##symbol[]	\
#  324|       __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
#  325|   #  endif

Error: COMPILER_WARNING: [#def20]
alsa-lib-1.2.14/include/local.h:323:21: warning[-Wunused-const-variable=]: '__evoke_link_warning_snd_pcm_info_get_sync' defined but not used
#  323 |   static const char __evoke_link_warning_##symbol[]     \
#      |                     ^~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.14/src/pcm/pcm.c:7366:1: note: in expansion of macro 'link_warning'
# 7366 | link_warning(snd_pcm_info_get_sync, "Warning: snd_pcm_info_get_sync is deprecated, consider to use snd_pcm_hw_params_get_sync");
#      | ^~~~~~~~~~~~
#  321|   #   define link_warning(symbol, msg) \
#  322|     __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
#  323|->   static const char __evoke_link_warning_##symbol[]	\
#  324|       __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
#  325|   #  endif

Error: COMPILER_WARNING: [#def21]
alsa-lib-1.2.14/include/local.h:323:21: warning[-Wunused-const-variable=]: '__evoke_link_warning_snd_pcm_start_mode_name' defined but not used
#  323 |   static const char __evoke_link_warning_##symbol[]     \
#      |                     ^~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.14/src/pcm/pcm.c:2260:1: note: in expansion of macro 'link_warning'
# 2260 | link_warning(snd_pcm_start_mode_name, "Warning: start_mode is deprecated, consider to use start_threshold");
#      | ^~~~~~~~~~~~
#  321|   #   define link_warning(symbol, msg) \
#  322|     __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
#  323|->   static const char __evoke_link_warning_##symbol[]	\
#  324|       __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
#  325|   #  endif

Error: COMPILER_WARNING: [#def22]
alsa-lib-1.2.14/include/local.h:323:21: warning[-Wunused-const-variable=]: '__evoke_link_warning_snd_pcm_sw_params_get_start_mode' defined but not used
#  323 |   static const char __evoke_link_warning_##symbol[]     \
#      |                     ^~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.14/src/pcm/pcm.c:6514:1: note: in expansion of macro 'link_warning'
# 6514 | link_warning(snd_pcm_sw_params_get_start_mode, "Warning: start_mode is deprecated, consider to use start_threshold");
#      | ^~~~~~~~~~~~
#  321|   #   define link_warning(symbol, msg) \
#  322|     __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
#  323|->   static const char __evoke_link_warning_##symbol[]	\
#  324|       __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
#  325|   #  endif

Error: COMPILER_WARNING: [#def23]
alsa-lib-1.2.14/include/local.h:323:21: warning[-Wunused-const-variable=]: '__evoke_link_warning_snd_pcm_sw_params_get_xrun_mode' defined but not used
#  323 |   static const char __evoke_link_warning_##symbol[]     \
#      |                     ^~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.14/src/pcm/pcm.c:6562:1: note: in expansion of macro 'link_warning'
# 6562 | link_warning(snd_pcm_sw_params_get_xrun_mode, "Warning: xrun_mode is deprecated, consider to use stop_threshold");
#      | ^~~~~~~~~~~~
#  321|   #   define link_warning(symbol, msg) \
#  322|     __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
#  323|->   static const char __evoke_link_warning_##symbol[]	\
#  324|       __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
#  325|   #  endif

Error: COMPILER_WARNING: [#def24]
alsa-lib-1.2.14/include/local.h:323:21: warning[-Wunused-const-variable=]: '__evoke_link_warning_snd_pcm_sw_params_set_start_mode' defined but not used
#  323 |   static const char __evoke_link_warning_##symbol[]     \
#      |                     ^~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.14/src/pcm/pcm.c:6498:1: note: in expansion of macro 'link_warning'
# 6498 | link_warning(snd_pcm_sw_params_set_start_mode, "Warning: start_mode is deprecated, consider to use start_threshold");
#      | ^~~~~~~~~~~~
#  321|   #   define link_warning(symbol, msg) \
#  322|     __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
#  323|->   static const char __evoke_link_warning_##symbol[]	\
#  324|       __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
#  325|   #  endif

Error: COMPILER_WARNING: [#def25]
alsa-lib-1.2.14/include/local.h:323:21: warning[-Wunused-const-variable=]: '__evoke_link_warning_snd_pcm_sw_params_set_xrun_mode' defined but not used
#  323 |   static const char __evoke_link_warning_##symbol[]     \
#      |                     ^~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.14/src/pcm/pcm.c:6546:1: note: in expansion of macro 'link_warning'
# 6546 | link_warning(snd_pcm_sw_params_set_xrun_mode, "Warning: xrun_mode is deprecated, consider to use stop_threshold");
#      | ^~~~~~~~~~~~
#  321|   #   define link_warning(symbol, msg) \
#  322|     __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
#  323|->   static const char __evoke_link_warning_##symbol[]	\
#  324|       __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
#  325|   #  endif

Error: COMPILER_WARNING: [#def26]
alsa-lib-1.2.14/include/local.h:323:21: warning[-Wunused-const-variable=]: '__evoke_link_warning_snd_pcm_xrun_mode_name' defined but not used
#  323 |   static const char __evoke_link_warning_##symbol[]     \
#      |                     ^~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.14/src/pcm/pcm.c:2276:1: note: in expansion of macro 'link_warning'
# 2276 | link_warning(snd_pcm_xrun_mode_name, "Warning: xrun_mode is deprecated, consider to use stop_threshold");
#      | ^~~~~~~~~~~~
#  321|   #   define link_warning(symbol, msg) \
#  322|     __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
#  323|->   static const char __evoke_link_warning_##symbol[]	\
#  324|       __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
#  325|   #  endif

Error: COMPILER_WARNING: [#def27]
alsa-lib-1.2.14/src/timer/timer_local.h:22: included_from: Included from here.
alsa-lib-1.2.14/src/timer/timer.c:70: included_from: Included from here.
alsa-lib-1.2.14/include/local.h:323:21: warning[-Wunused-const-variable=]: '__evoke_link_warning_snd_timer_info_get_ticks' defined but not used
#  323 |   static const char __evoke_link_warning_##symbol[]     \
#      |                     ^~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.14/src/timer/timer.c:963:1: note: in expansion of macro 'link_warning'
#  963 | link_warning(snd_timer_info_get_ticks, "Warning: snd_timer_info_get_ticks is deprecated");
#      | ^~~~~~~~~~~~
#  321|   #   define link_warning(symbol, msg) \
#  322|     __make_section_unallocated (".gnu.warning." ASM_NAME(#symbol)) \
#  323|->   static const char __evoke_link_warning_##symbol[]	\
#  324|       __attribute__ ((section (".gnu.warning." ASM_NAME(#symbol) "\n\t#"))) = msg;
#  325|   #  endif

Error: CPPCHECK_WARNING (CWE-476): [#def28]
alsa-lib-1.2.14/src/conf.c:4157: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: filename
# 4155|   				int sl = strlen(fn) + strlen(namelist[j]->d_name) + 2;
# 4156|   				char *filename = malloc(sl);
# 4157|-> 				snprintf(filename, sl, "%s/%s", fn, namelist[j]->d_name);
# 4158|   				filename[sl-1] = '\0';
# 4159|   

Error: GCC_ANALYZER_WARNING (CWE-121): [#def29]
alsa-lib-1.2.14/src/control/eld.c:92:25: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
alsa-lib-1.2.14/src/control/eld.c:55:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/control/eld.c:60:52: branch_false: ...to here
alsa-lib-1.2.14/src/control/eld.c:66:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/control/eld.c:68:12: branch_false: following 'false' branch (when 'ret >= 0')...
alsa-lib-1.2.14/src/control/eld.c:74:13: branch_false: ...to here
alsa-lib-1.2.14/src/control/eld.c:74:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/control/eld.c:76:13: branch_false: ...to here
alsa-lib-1.2.14/src/control/eld.c:77:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/control/eld.c:80:12: branch_false: ...to here
alsa-lib-1.2.14/src/control/eld.c:80:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/control/eld.c:88:16: branch_true: following 'true' branch (when 'l != 0')...
alsa-lib-1.2.14/src/control/eld.c:89:17: branch_true: ...to here
alsa-lib-1.2.14/src/control/eld.c:91:20: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/control/eld.c:92:26: branch_true: ...to here
alsa-lib-1.2.14/src/control/eld.c:92:25: danger: write of 1 byte at offset '(sizetype)l' exceeds the buffer
#   90|   		c = eld[20 + l];
#   91|   		if (c <= ' ' || c >= 0x7f) {
#   92|-> 			s[l] = ' ';
#   93|   		} else {
#   94|   			valid += !!isalnum(c);

Error: GCC_ANALYZER_WARNING (CWE-121): [#def30]
alsa-lib-1.2.14/src/control/eld.c:95:25: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
alsa-lib-1.2.14/src/control/eld.c:55:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/control/eld.c:60:52: branch_false: ...to here
alsa-lib-1.2.14/src/control/eld.c:66:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/control/eld.c:68:12: branch_false: following 'false' branch (when 'ret >= 0')...
alsa-lib-1.2.14/src/control/eld.c:74:13: branch_false: ...to here
alsa-lib-1.2.14/src/control/eld.c:74:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/control/eld.c:76:13: branch_false: ...to here
alsa-lib-1.2.14/src/control/eld.c:77:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/control/eld.c:80:12: branch_false: ...to here
alsa-lib-1.2.14/src/control/eld.c:80:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/control/eld.c:88:16: branch_true: following 'true' branch (when 'l != 0')...
alsa-lib-1.2.14/src/control/eld.c:89:17: branch_true: ...to here
alsa-lib-1.2.14/src/control/eld.c:91:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/control/eld.c:94:36: branch_false: ...to here
alsa-lib-1.2.14/src/control/eld.c:95:25: danger: write of 1 byte at offset '(sizetype)l' exceeds the buffer
#   93|   		} else {
#   94|   			valid += !!isalnum(c);
#   95|-> 			s[l] = c;
#   96|   			if (spc == 0)
#   97|   				spc = l + 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
alsa-lib-1.2.14/src/control/hcontrol.c:757:20: warning[-Wanalyzer-malloc-leak]: leak of 'elem'
alsa-lib-1.2.14/src/control/hcontrol.c:729:12: enter_function: entry to 'snd_hctl_handle_event'
alsa-lib-1.2.14/src/control/hcontrol.c:734:9: branch_true: following 'true' branch (when 'hctl' is non-NULL)...
alsa-lib-1.2.14/src/control/hcontrol.c:735:9: branch_true: ...to here
alsa-lib-1.2.14/src/control/hcontrol.c:735:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/control/hcontrol.c:736:17: branch_true: ...to here
alsa-lib-1.2.14/src/control/hcontrol.c:736:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/control/hcontrol.c:742:13: branch_true: ...to here
alsa-lib-1.2.14/src/control/hcontrol.c:742:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/control/hcontrol.c:750:13: branch_false: ...to here
alsa-lib-1.2.14/src/control/hcontrol.c:750:12: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/control/hcontrol.c:751:24: branch_true: ...to here
alsa-lib-1.2.14/src/control/hcontrol.c:751:24: acquire_memory: allocated here
alsa-lib-1.2.14/src/control/hcontrol.c:752:20: branch_false: following 'false' branch (when 'elem' is non-NULL)...
alsa-lib-1.2.14/src/control/hcontrol.c:754:17: branch_false: ...to here
alsa-lib-1.2.14/src/control/hcontrol.c:756:23: call_function: calling 'snd_hctl_elem_add' from 'snd_hctl_handle_event'
alsa-lib-1.2.14/src/control/hcontrol.c:756:23: return_function: returning to 'snd_hctl_handle_event' from 'snd_hctl_elem_add'
alsa-lib-1.2.14/src/control/hcontrol.c:757:20: branch_true: following 'true' branch...
 branch_true: ...to here
alsa-lib-1.2.14/src/control/hcontrol.c:757:20: danger: 'elem' leaks here; was allocated at [(12)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/11)
#  755|   		elem->hctl = hctl;
#  756|   		res = snd_hctl_elem_add(hctl, elem);
#  757|-> 		if (res < 0)
#  758|   			return res;
#  759|   	}

Error: CPPCHECK_WARNING (CWE-562): [#def32]
alsa-lib-1.2.14/src/control/namehint.c:457: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  455|   	int device, max_device = 0;
#  456|   	
#  457|-> 	list->info = &info;
#  458|   	err = snd_config_search(config, list->siface, &conf);
#  459|   	if (err < 0)

Error: CPPCHECK_WARNING (CWE-401): [#def33]
alsa-lib-1.2.14/src/dlmisc.c:361: error[memleak]: Memory leak: c.name
#  359|   		free((void *)c->name);
#  360|   		free((void *)c->lib);
#  361|-> 		free(c);
#  362|   	      __err:
#  363|   		snd_dlclose(dlobj);

Error: CPPCHECK_WARNING (CWE-401): [#def34]
alsa-lib-1.2.14/src/mixer/bag.c:52: error[memleak]: Memory leak: b
#   50|   	b->ptr = ptr;
#   51|   	list_add_tail(&b->list, bag);
#   52|-> 	return 0;
#   53|   }
#   54|   

Error: CPPCHECK_WARNING (CWE-401): [#def35]
alsa-lib-1.2.14/src/mixer/mixer.c:253: error[memleak]: Memory leak: slave
#  251|   	slave->hctl = hctl;
#  252|   	list_add_tail(&slave->list, &mixer->slaves);
#  253|-> 	return 0;
#  254|   }
#  255|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
alsa-lib-1.2.14/src/output.c:271:16: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
alsa-lib-1.2.14/src/output.c:274:12: enter_function: entry to 'snd_output_buffer_print'
alsa-lib-1.2.14/src/output.c:280:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/output.c:282:36: branch_false: ...to here
alsa-lib-1.2.14/src/output.c:283:9: branch_true: following 'true' branch (when 'result >= 0')...
alsa-lib-1.2.14/src/output.c:284:13: branch_true: ...to here
alsa-lib-1.2.14/src/output.c:284:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/output.c:289:18: branch_false: ...to here
alsa-lib-1.2.14/src/output.c:289:18: call_function: calling 'snd_output_buffer_need' from 'snd_output_buffer_print'
#  269|   	buffer->buf = buf;
#  270|   	buffer->alloc = alloc;
#  271|-> 	return buffer->alloc - buffer->size;
#  272|   }
#  273|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def37]
alsa-lib-1.2.14/src/pcm/../../include/pcm.h:1214:24: warning[-Wanalyzer-null-dereference]: dereference of NULL 'src_area'
alsa-lib-1.2.14/src/pcm/pcm_route.c:227:13: enter_function: entry to 'snd_pcm_route_convert1_many'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_route.c:291:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_route.c:297:25: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:297:25: call_function: calling 'snd_pcm_route_convert1_one' from 'snd_pcm_route_convert1_many'
# 1212|   static inline void *snd_pcm_channel_area_addr(const snd_pcm_channel_area_t *area, snd_pcm_uframes_t offset)
# 1213|   {
# 1214|-> 	return (char *)area->addr + (area->first + area->step * offset) / 8;
# 1215|   }
# 1216|   

Error: CPPCHECK_WARNING (CWE-457): [#def38]
alsa-lib-1.2.14/src/pcm/pcm.c:5350: warning[uninitvar]: Uninitialized variable: *val
# 5348|   #endif
# 5349|   {
# 5350|-> 	unsigned int _val = *val;
# 5351|   	int err = snd_pcm_hw_param_get_min(params, SND_PCM_HW_PARAM_PERIOD_SIZE, &_val, dir);
# 5352|   	if (err >= 0)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def39]
alsa-lib-1.2.14/src/pcm/pcm.c:5350:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*val'
alsa-lib-1.2.14/src/pcm/pcm.c:8099:1: enter_function: entry to '__old_snd_pcm_hw_params_get_period_size_min'
alsa-lib-1.2.14/src/pcm/pcm.c:8099:1: call_function: calling '__snd_pcm_hw_params_get_period_size_min' from '__old_snd_pcm_hw_params_get_period_size_min'
# 5348|   #endif
# 5349|   {
# 5350|-> 	unsigned int _val = *val;
# 5351|   	int err = snd_pcm_hw_param_get_min(params, SND_PCM_HW_PARAM_PERIOD_SIZE, &_val, dir);
# 5352|   	if (err >= 0)

Error: CPPCHECK_WARNING (CWE-457): [#def40]
alsa-lib-1.2.14/src/pcm/pcm.c:5372: warning[uninitvar]: Uninitialized variable: *val
# 5370|   #endif
# 5371|   {
# 5372|-> 	unsigned int _val = *val;
# 5373|   	int err = snd_pcm_hw_param_get_max(params, SND_PCM_HW_PARAM_PERIOD_SIZE, &_val, dir);
# 5374|   	if (err >= 0)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def41]
alsa-lib-1.2.14/src/pcm/pcm.c:5372:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*val'
alsa-lib-1.2.14/src/pcm/pcm.c:8108:1: enter_function: entry to '__old_snd_pcm_hw_params_get_period_size_max'
alsa-lib-1.2.14/src/pcm/pcm.c:8108:1: call_function: calling '__snd_pcm_hw_params_get_period_size_max' from '__old_snd_pcm_hw_params_get_period_size_max'
# 5370|   #endif
# 5371|   {
# 5372|-> 	unsigned int _val = *val;
# 5373|   	int err = snd_pcm_hw_param_get_max(params, SND_PCM_HW_PARAM_PERIOD_SIZE, &_val, dir);
# 5374|   	if (err >= 0)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def42]
alsa-lib-1.2.14/src/pcm/pcm.c:8173:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'val'
alsa-lib-1.2.14/src/pcm/pcm.c:8173:1: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm.c:8173:1: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm.c:8173:1: danger: use of uninitialized value 'val' here
# 8171|   __OLD_SET_FL1(snd_pcm_hw_params_set_buffer_time_first, unsigned int);
# 8172|   __OLD_SET_FL(snd_pcm_hw_params_set_buffer_size_first, snd_pcm_uframes_t);
# 8173|-> __OLD_SET_FL1(snd_pcm_hw_params_set_tick_time_first, unsigned int);
# 8174|   
# 8175|   __OLD_SET_FL(snd_pcm_hw_params_set_access_last, snd_pcm_access_t);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def43]
alsa-lib-1.2.14/src/pcm/pcm.c:8185:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'val'
alsa-lib-1.2.14/src/pcm/pcm.c:8185:1: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm.c:8185:1: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm.c:8185:1: danger: use of uninitialized value 'val' here
# 8183|   __OLD_SET_FL1(snd_pcm_hw_params_set_buffer_time_last, unsigned int);
# 8184|   __OLD_SET_FL(snd_pcm_hw_params_set_buffer_size_last, snd_pcm_uframes_t);
# 8185|-> __OLD_SET_FL1(snd_pcm_hw_params_set_tick_time_last, unsigned int);
# 8186|   
# 8187|   #define __P_OLD_GET_SW(pfx, name, ret_type) \

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
alsa-lib-1.2.14/src/pcm/pcm_adpcm.c:443:12: warning[-Wanalyzer-malloc-leak]: leak of 'malloc((long unsigned int)*adpcm_21->plug.gen.slave.channels * 8)'
alsa-lib-1.2.14/src/pcm/pcm_adpcm.c:417:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_adpcm.c:420:15: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_adpcm.c:421:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_adpcm.c:424:13: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_adpcm.c:441:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_adpcm.c:442:32: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_adpcm.c:442:25: acquire_memory: allocated here
alsa-lib-1.2.14/src/pcm/pcm_adpcm.c:443:12: danger: 'malloc((long unsigned int)*adpcm_21->plug.gen.slave.channels * 8)' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  441|   	assert(!adpcm->states);
#  442|   	adpcm->states = malloc(adpcm->plug.gen.slave->channels * sizeof(*adpcm->states));
#  443|-> 	if (adpcm->states == NULL)
#  444|   		return -ENOMEM;
#  445|   	return 0;

Error: CPPCHECK_WARNING (CWE-401): [#def45]
alsa-lib-1.2.14/src/pcm/pcm_file.c:132: error[memleakOnRealloc]: Common realloc mistake: 'string' nulled but not freed upon failure
#  130|   	index = index_ch - string;
#  131|   	len += value_len;
#  132|-> 	string = realloc(string, len + 1);
#  133|   	if (!string)
#  134|   		return -ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
alsa-lib-1.2.14/src/pcm/pcm_file.c:161:24: warning[-Wanalyzer-malloc-leak]: leak of 'new_index_ch'
alsa-lib-1.2.14/src/pcm/pcm_file.c:751:12: enter_function: entry to 'snd_pcm_file_hw_params'
alsa-lib-1.2.14/src/pcm/pcm_file.c:757:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:759:61: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:764:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:765:22: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:766:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:770:63: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:771:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:775:9: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:775:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:776:27: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:780:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:784:26: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:791:12: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:792:23: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:792:23: call_function: calling 'snd_pcm_file_open_output_file' from 'snd_pcm_file_hw_params'
#  159|   	new_fname = malloc(new_len + 1);
#  160|   	if (!new_fname)
#  161|-> 		return -ENOMEM;
#  162|   
#  163|   	old_index_ch = fname;	/* first character of the old name */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
alsa-lib-1.2.14/src/pcm/pcm_file.c:766:12: warning[-Wanalyzer-malloc-leak]: leak of 'malloc((long unsigned int)snd_pcm_frames_to_bytes(slave, (long int)(*slave.buffer_size * 2)))'
alsa-lib-1.2.14/src/pcm/pcm_file.c:757:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:759:61: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:764:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:765:22: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:765:22: acquire_memory: allocated here
alsa-lib-1.2.14/src/pcm/pcm_file.c:766:12: danger: 'malloc((long unsigned int)snd_pcm_frames_to_bytes(slave, (long int)(*slave.buffer_size * 2)))' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  764|   	assert(!file->wbuf);
#  765|   	file->wbuf = malloc(file->wbuf_size_bytes);
#  766|-> 	if (file->wbuf == NULL) {
#  767|   		snd_pcm_file_hw_free(pcm);
#  768|   		return -ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
alsa-lib-1.2.14/src/pcm/pcm_file.c:771:12: warning[-Wanalyzer-malloc-leak]: leak of 'malloc((long unsigned int)*slave.channels * 16)'
alsa-lib-1.2.14/src/pcm/pcm_file.c:757:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:759:61: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:764:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:765:22: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:765:22: acquire_memory: allocated here
alsa-lib-1.2.14/src/pcm/pcm_file.c:766:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:770:63: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:770:28: acquire_memory: allocated here
alsa-lib-1.2.14/src/pcm/pcm_file.c:771:12: danger: 'malloc((long unsigned int)*slave.channels * 16)' leaks here; was allocated at [(8)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/7)
#  769|   	}
#  770|   	file->wbuf_areas = malloc(sizeof(*file->wbuf_areas) * slave->channels);
#  771|-> 	if (file->wbuf_areas == NULL) {
#  772|   		snd_pcm_file_hw_free(pcm);
#  773|   		return -ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
alsa-lib-1.2.14/src/pcm/pcm_file.c:780:12: warning[-Wanalyzer-malloc-leak]: leak of 'malloc((long unsigned int)snd_pcm_frames_to_bytes(slave, (long int)*slave.buffer_size))'
alsa-lib-1.2.14/src/pcm/pcm_file.c:757:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:759:61: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:764:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:765:22: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:765:22: acquire_memory: allocated here
alsa-lib-1.2.14/src/pcm/pcm_file.c:766:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:770:63: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:770:28: acquire_memory: allocated here
alsa-lib-1.2.14/src/pcm/pcm_file.c:771:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:775:9: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:775:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:776:27: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:779:22: acquire_memory: allocated here
alsa-lib-1.2.14/src/pcm/pcm_file.c:780:12: danger: 'malloc((long unsigned int)snd_pcm_frames_to_bytes(slave, (long int)*slave.buffer_size))' leaks here; was allocated at [(13)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/12)
#  778|   	file->rbuf_used_bytes = 0;
#  779|   	file->rbuf = malloc(file->rbuf_size_bytes);
#  780|-> 	if (file->rbuf == NULL) {
#  781|   		snd_pcm_file_hw_free(pcm);
#  782|   		return -ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
alsa-lib-1.2.14/src/pcm/pcm_file.c:918:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'ifd'
alsa-lib-1.2.14/src/pcm/pcm_file.c:910:9: branch_true: following 'true' branch (when 'pcmp' is non-NULL)...
alsa-lib-1.2.14/src/pcm/pcm_file.c:911:12: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:921:12: branch_false: following 'false' branch (when 'file' is non-NULL)...
alsa-lib-1.2.14/src/pcm/pcm_file.c:927:12: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:927:12: branch_false: following 'false' branch (when 'fname' is NULL)...
alsa-lib-1.2.14/src/pcm/pcm_file.c:929:9: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:932:12: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:933:23: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:933:23: acquire_resource: opened here
alsa-lib-1.2.14/src/pcm/pcm_file.c:934:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:940:32: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:949:12: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_file.c:950:22: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_file.c:918:24: danger: 'ifd' leaks here; was opened at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
#  916|   	else {
#  917|   		SNDERR("file format %s is unknown", fmt);
#  918|-> 		return -EINVAL;
#  919|   	}
#  920|   	file = calloc(1, sizeof(snd_pcm_file_t));

Error: CPPCHECK_WARNING (CWE-401): [#def51]
alsa-lib-1.2.14/src/pcm/pcm_hooks.c:69: error[memleak]: Memory leak: dl
#   67|   	dl->dlobj = dlobj;
#   68|   	list_add_tail(&dl->list, &h->dllist);
#   69|-> 	return 0;
#   70|   }
#   71|   

Error: GCC_ANALYZER_WARNING (CWE-415): [#def52]
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:177:9: warning[-Wanalyzer-double-free]: double-'free' of '*io.controls'
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1586:5: enter_function: entry to 'snd_pcm_ladspa_open'
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1597:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1602:12: branch_false: following 'false' branch (when 'ladspa' is non-NULL)...
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1604:9: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1635:12: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1636:17: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1636:17: call_function: calling 'snd_pcm_ladspa_free' from 'snd_pcm_ladspa_open'
#  175|   static void snd_pcm_ladspa_free_io(snd_pcm_ladspa_plugin_io_t *io)
#  176|   {
#  177|-> 	free(io->controls);
#  178|   	free(io->controls_initialized);
#  179|   }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def53]
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:178:9: warning[-Wanalyzer-double-free]: double-'free' of '*io.controls_initialized'
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1586:5: enter_function: entry to 'snd_pcm_ladspa_open'
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1597:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1602:12: branch_false: following 'false' branch (when 'ladspa' is non-NULL)...
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1604:9: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1635:12: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1636:17: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1636:17: call_function: calling 'snd_pcm_ladspa_free' from 'snd_pcm_ladspa_open'
#  176|   {
#  177|   	free(io->controls);
#  178|-> 	free(io->controls_initialized);
#  179|   }
#  180|   

Error: GCC_ANALYZER_WARNING (CWE-416): [#def54]
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:187:21: warning[-Wanalyzer-use-after-free]: use after 'free' of '*plugins.next'
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1586:5: enter_function: entry to 'snd_pcm_ladspa_open'
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1597:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1602:12: branch_false: following 'false' branch (when 'ladspa' is non-NULL)...
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1604:9: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1635:12: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1636:17: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1636:17: call_function: calling 'snd_pcm_ladspa_free' from 'snd_pcm_ladspa_open'
#  185|                   snd_pcm_ladspa_free_io(&plugin->input);
#  186|                   snd_pcm_ladspa_free_io(&plugin->output);
#  187|-> 		if (plugin->dl_handle)
#  188|   			dlclose(plugin->dl_handle);
#  189|   		free(plugin->filename);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def55]
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:189:17: warning[-Wanalyzer-double-free]: double-'free' of '*(snd_pcm_ladspa_plugin_t *)MEM[(const struct list_head *)plugins_8(D)].next.filename'
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1586:5: enter_function: entry to 'snd_pcm_ladspa_open'
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1597:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1602:12: branch_false: following 'false' branch (when 'ladspa' is non-NULL)...
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1604:9: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1635:12: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1636:17: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_ladspa.c:1636:17: call_function: calling 'snd_pcm_ladspa_free' from 'snd_pcm_ladspa_open'
#  187|   		if (plugin->dl_handle)
#  188|   			dlclose(plugin->dl_handle);
#  189|-> 		free(plugin->filename);
#  190|   		list_del(&plugin->list);
#  191|   		free(plugin);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
alsa-lib-1.2.14/src/pcm/pcm_meter.c:464:63: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(buf_size_bytes)'
alsa-lib-1.2.14/src/pcm/pcm_meter.c:453:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:456:27: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:460:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:461:22: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:461:22: acquire_memory: allocated here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:462:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:464:63: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:464:63: danger: 'malloc(buf_size_bytes)' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  462|   	if (!meter->buf)
#  463|   		return -ENOMEM;
#  464|-> 	meter->buf_areas = malloc(sizeof(*meter->buf_areas) * slave->channels);
#  465|   	if (!meter->buf_areas) {
#  466|   		free(meter->buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
alsa-lib-1.2.14/src/pcm/pcm_meter.c:465:12: warning[-Wanalyzer-malloc-leak]: leak of 'malloc((long unsigned int)*slave.channels * 16)'
alsa-lib-1.2.14/src/pcm/pcm_meter.c:453:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:456:27: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:460:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:461:22: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:462:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:464:63: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:464:28: acquire_memory: allocated here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:465:12: danger: 'malloc((long unsigned int)*slave.channels * 16)' leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  463|   		return -ENOMEM;
#  464|   	meter->buf_areas = malloc(sizeof(*meter->buf_areas) * slave->channels);
#  465|-> 	if (!meter->buf_areas) {
#  466|   		free(meter->buf);
#  467|   		return -ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1049:20: warning[-Wanalyzer-malloc-leak]: leak of 'calloc((long unsigned int)*spcm.channels, 8)'
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1047:12: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1048:44: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1048:37: acquire_memory: allocated here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1049:20: danger: 'calloc((long unsigned int)*spcm.channels, 8)' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 1047|   	if (spcm->format == SND_PCM_FORMAT_IMA_ADPCM) {
# 1048|   		s16->adpcm_states = calloc(spcm->channels, sizeof(*s16->adpcm_states));
# 1049|-> 		if (!s16->adpcm_states)
# 1050|   			return -ENOMEM;
# 1051|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1064:21: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1052:20: acquire_memory: allocated here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1053:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1057:13: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1058:12: branch_false: following 'false' branch (when 'a' is non-NULL)...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1063:9: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1064:21: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1065:38: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1064:21: danger: '<unknown>' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 1062|   	}
# 1063|   	s16->buf_areas = a;
# 1064|-> 	for (c = 0; c < spcm->channels; c++, a++) {
# 1065|   		a->addr = s16->buf + c * meter->buf_size;
# 1066|   		a->first = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1064:21: warning[-Wanalyzer-malloc-leak]: leak of 'a'
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1053:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1057:13: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1057:13: acquire_memory: allocated here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1058:12: branch_false: following 'false' branch (when 'a' is non-NULL)...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1063:9: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1064:21: branch_false: following 'false' branch...
 branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1064:21: danger: 'a' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 1062|   	}
# 1063|   	s16->buf_areas = a;
# 1064|-> 	for (c = 0; c < spcm->channels; c++, a++) {
# 1065|   		a->addr = s16->buf + c * meter->buf_size;
# 1066|   		a->first = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1064:25: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(*meter.buf_size * (long unsigned int)*spcm.channels * 2)'
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1052:20: acquire_memory: allocated here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1053:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1057:13: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1058:12: branch_false: following 'false' branch (when 'a' is non-NULL)...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1063:9: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1064:25: danger: 'malloc(*meter.buf_size * (long unsigned int)*spcm.channels * 2)' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 1062|   	}
# 1063|   	s16->buf_areas = a;
# 1064|-> 	for (c = 0; c < spcm->channels; c++, a++) {
# 1065|   		a->addr = s16->buf + c * meter->buf_size;
# 1066|   		a->first = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1064:46: warning[-Wanalyzer-malloc-leak]: leak of 'a'
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1053:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1057:13: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1057:13: acquire_memory: allocated here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1058:12: branch_false: following 'false' branch (when 'a' is non-NULL)...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1063:9: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1064:21: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1065:38: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_meter.c:1064:46: danger: 'a' leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 1062|   	}
# 1063|   	s16->buf_areas = a;
# 1064|-> 	for (c = 0; c < spcm->channels; c++, a++) {
# 1065|   		a->addr = s16->buf + c * meter->buf_size;
# 1066|   		a->first = 0;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def63]
alsa-lib-1.2.14/src/pcm/pcm_multi.c:969:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*slave_maps[<unknown>]'
alsa-lib-1.2.14/src/pcm/pcm_multi.c:953:12: branch_false: following 'false' branch...
 branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_multi.c:956:21: branch_false: following 'false' branch...
 branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_multi.c:967:21: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_multi.c:968:50: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_multi.c:969:17: danger: use of uninitialized value '*slave_maps[<unknown>]' here
#  967|   	for (i = 0; i < multi->channels_count; i++) {
#  968|   		snd_pcm_multi_channel_t *bind = &multi->channels[i];
#  969|-> 		slave_maps[bind->slave_idx]->pos[bind->slave_channel] =
#  970|   			map->pos[i];
#  971|   	}

Error: CPPCHECK_WARNING (CWE-457): [#def64]
alsa-lib-1.2.14/src/pcm/pcm_plug.c:709: error[uninitvar]: Uninitialized variable: new
#  707|   		}
#  708|   		if (err) {
#  709|-> 			plug->gen.slave = new;
#  710|   		}
#  711|   		k++;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def65]
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1369:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'sused'
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1281:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1282:35: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1284:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1286:21: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1286:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1288:21: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1281:9: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1330:12: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1330:12: branch_false: following 'false' branch (when 'slave' is non-NULL)...
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1334:15: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1338:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1341:12: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1341:12: branch_false: following 'false' branch (when 'tt' is NULL)...
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1361:12: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1361:12: branch_true: following 'true' branch (when 'rate_converter' is NULL)...
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1362:34: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1367:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1369:15: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_plug.c:1369:15: danger: use of uninitialized value 'sused' here
# 1367|   	if (err < 0)
# 1368|   		return err;
# 1369|-> 	err = snd_pcm_plug_open(pcmp, name, sformat, schannels, srate, rate_converter,
# 1370|   				route_policy, ttable, ssize, cused, sused, spcm, 1);
# 1371|   	if (err < 0)

Error: CPPCHECK_WARNING (CWE-457): [#def66]
alsa-lib-1.2.14/src/pcm/pcm_plugin.c:633: error[legacyUninitvar]: Uninitialized variable: *&swparams
#  631|   		if (slave->avail_min != needed_slave_avail_min) {
#  632|   			snd_pcm_sw_params_t *swparams;
#  633|-> 			snd_pcm_sw_params_alloca(&swparams);
#  634|   			/* pray that changing sw_params while running is
#  635|   			 * properly implemented in all downstream plugins...

Error: GCC_ANALYZER_WARNING (CWE-476): [#def67]
alsa-lib-1.2.14/src/pcm/pcm_route.c:781:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'chmap'
alsa-lib-1.2.14/src/pcm/pcm_route.c:777:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_route.c:778:17: branch_true: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:778:17: acquire_memory: this call could return NULL
alsa-lib-1.2.14/src/pcm/pcm_route.c:781:9: danger: 'chmap' could be NULL: unchecked value from [(3)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/2)
#  779|   		       MAX_CHMAP_CHANNELS * sizeof(unsigned int));
#  780|   
#  781|-> 	chmap->channels = 0;
#  782|   	snd_config_for_each(i, inext, tt) {
#  783|   		const char *id;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def68]
alsa-lib-1.2.14/src/pcm/pcm_route.c:992:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '__builtin_alloca_with_align((sizetype)sused * 12, 32)'
alsa-lib-1.2.14/src/pcm/pcm_route.c:1017:5: enter_function: entry to 'snd_pcm_route_open'
alsa-lib-1.2.14/src/pcm/pcm_route.c:1027:9: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/pcm/pcm_route.c:1032:12: branch_false: following 'false' branch (when 'route' is non-NULL)...
alsa-lib-1.2.14/src/pcm/pcm_route.c:1035:9: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:1047:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/pcm/pcm_route.c:1051:12: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:1059:15: call_function: calling 'route_load_ttable' from 'snd_pcm_route_open'
#  990|   			if (!dptr->srcs)
#  991|   				return -ENOMEM;
#  992|-> 			memcpy(dptr->srcs, srcs, sizeof(*srcs) * nsrcs);
#  993|   		} else
#  994|   			dptr->srcs = 0;

Error: COMPILER_WARNING (CWE-252): [#def69]
alsa-lib-1.2.14/src/pcm/pcm_share.c: scope_hint: In function 'snd_pcm_share_thread'
alsa-lib-1.2.14/src/pcm/pcm_share.c:417:33: warning[-Wunused-result]: ignoring return value of 'read' declared with attribute 'warn_unused_result'
#  417 |                                 read(pfd[0].fd, buf, 1);
#      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
#  415|   			if (pfd[0].revents & POLLIN) {
#  416|   				char buf[1];
#  417|-> 				read(pfd[0].fd, buf, 1);
#  418|   			}
#  419|   		} else {

Error: COMPILER_WARNING (CWE-457): [#def70]
alsa-lib-1.2.14/src/pcm/pcm_route.c:333: included_from: Included from here.
alsa-lib-1.2.14/src/pcm/plugin_ops.h: scope_hint: In function 'snd_pcm_route_convert1_many'
alsa-lib-1.2.14/src/pcm/plugin_ops.h:67:105: warning[-Wmaybe-uninitialized]: 'src' may be used uninitialized
#   67 | #define _get_triple_be(ptr) ((uint32_t)*(uint8_t*)(ptr) << 16 | (uint32_t)*((uint8_t*)(ptr) + 1) << 8 | *((uint8_t*)(ptr) + 2))
#      |                                                                                                         ^~~~~~~~~~~~~~~~~~~~~~
alsa-lib-1.2.14/src/pcm/pcm_route.c:328:37: note: 'src' was declared here
#  328 |                         const char *src = srcs[srcidx];
#      |                                     ^~~
#   65|   
#   66|   #define _get_triple_le(ptr) (*(uint8_t*)(ptr) | (uint32_t)*((uint8_t*)(ptr) + 1) << 8 | (uint32_t)*((uint8_t*)(ptr) + 2) << 16)
#   67|-> #define _get_triple_be(ptr) ((uint32_t)*(uint8_t*)(ptr) << 16 | (uint32_t)*((uint8_t*)(ptr) + 1) << 8 | *((uint8_t*)(ptr) + 2))
#   68|   #define _put_triple_le(ptr,val) do { \
#   69|   	uint8_t *_tmp = (uint8_t *)(ptr); \

Error: GCC_ANALYZER_WARNING (CWE-457): [#def71]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:529:34: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:529:34: danger: use of uninitialized value 'src' here
#  527|   #ifdef GET32_END
#  528|   while (0) {
#  529|-> get32_1_1000: sample = (uint32_t)as_u8c(src) << 24; goto GET32_END;
#  530|   get32_1_9000: sample = (uint32_t)(as_u8c(src) ^ 0x80) << 24; goto GET32_END;
#  531|   get32_12_1200: sample = (uint32_t)as_u16c(src) << 16; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def72]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:530:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:530:35: danger: use of uninitialized value 'src' here
#  528|   while (0) {
#  529|   get32_1_1000: sample = (uint32_t)as_u8c(src) << 24; goto GET32_END;
#  530|-> get32_1_9000: sample = (uint32_t)(as_u8c(src) ^ 0x80) << 24; goto GET32_END;
#  531|   get32_12_1200: sample = (uint32_t)as_u16c(src) << 16; goto GET32_END;
#  532|   get32_12_9200: sample = (uint32_t)(as_u16c(src) ^ 0x8000) << 16; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def73]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:531:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:531:35: danger: use of uninitialized value 'src' here
#  529|   get32_1_1000: sample = (uint32_t)as_u8c(src) << 24; goto GET32_END;
#  530|   get32_1_9000: sample = (uint32_t)(as_u8c(src) ^ 0x80) << 24; goto GET32_END;
#  531|-> get32_12_1200: sample = (uint32_t)as_u16c(src) << 16; goto GET32_END;
#  532|   get32_12_9200: sample = (uint32_t)(as_u16c(src) ^ 0x8000) << 16; goto GET32_END;
#  533|   get32_12_2100: sample = (uint32_t)bswap_16(as_u16c(src)) << 16; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def74]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:532:36: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:532:36: danger: use of uninitialized value 'src' here
#  530|   get32_1_9000: sample = (uint32_t)(as_u8c(src) ^ 0x80) << 24; goto GET32_END;
#  531|   get32_12_1200: sample = (uint32_t)as_u16c(src) << 16; goto GET32_END;
#  532|-> get32_12_9200: sample = (uint32_t)(as_u16c(src) ^ 0x8000) << 16; goto GET32_END;
#  533|   get32_12_2100: sample = (uint32_t)bswap_16(as_u16c(src)) << 16; goto GET32_END;
#  534|   get32_12_A100: sample = (uint32_t)bswap_16(as_u16c(src) ^ 0x80) << 16; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def75]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:533:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:533:35: danger: use of uninitialized value 'src' here
#  531|   get32_12_1200: sample = (uint32_t)as_u16c(src) << 16; goto GET32_END;
#  532|   get32_12_9200: sample = (uint32_t)(as_u16c(src) ^ 0x8000) << 16; goto GET32_END;
#  533|-> get32_12_2100: sample = (uint32_t)bswap_16(as_u16c(src)) << 16; goto GET32_END;
#  534|   get32_12_A100: sample = (uint32_t)bswap_16(as_u16c(src) ^ 0x80) << 16; goto GET32_END;
#  535|   get32_0123_1230: sample = as_u32c(src) << 8; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def76]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:534:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:534:35: danger: use of uninitialized value 'src' here
#  532|   get32_12_9200: sample = (uint32_t)(as_u16c(src) ^ 0x8000) << 16; goto GET32_END;
#  533|   get32_12_2100: sample = (uint32_t)bswap_16(as_u16c(src)) << 16; goto GET32_END;
#  534|-> get32_12_A100: sample = (uint32_t)bswap_16(as_u16c(src) ^ 0x80) << 16; goto GET32_END;
#  535|   get32_0123_1230: sample = as_u32c(src) << 8; goto GET32_END;
#  536|   get32_0123_9230: sample = (as_u32c(src) << 8) ^ 0x80000000; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def77]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:535:27: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:535:27: danger: use of uninitialized value 'src' here
#  533|   get32_12_2100: sample = (uint32_t)bswap_16(as_u16c(src)) << 16; goto GET32_END;
#  534|   get32_12_A100: sample = (uint32_t)bswap_16(as_u16c(src) ^ 0x80) << 16; goto GET32_END;
#  535|-> get32_0123_1230: sample = as_u32c(src) << 8; goto GET32_END;
#  536|   get32_0123_9230: sample = (as_u32c(src) << 8) ^ 0x80000000; goto GET32_END;
#  537|   get32_1230_3210: sample = bswap_32(as_u32c(src) >> 8); goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def78]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:536:28: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:536:28: danger: use of uninitialized value 'src' here
#  534|   get32_12_A100: sample = (uint32_t)bswap_16(as_u16c(src) ^ 0x80) << 16; goto GET32_END;
#  535|   get32_0123_1230: sample = as_u32c(src) << 8; goto GET32_END;
#  536|-> get32_0123_9230: sample = (as_u32c(src) << 8) ^ 0x80000000; goto GET32_END;
#  537|   get32_1230_3210: sample = bswap_32(as_u32c(src) >> 8); goto GET32_END;
#  538|   get32_1230_B210: sample = bswap_32((as_u32c(src) >> 8) ^ 0x80); goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def79]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:537:27: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:537:27: danger: use of uninitialized value 'src' here
#  535|   get32_0123_1230: sample = as_u32c(src) << 8; goto GET32_END;
#  536|   get32_0123_9230: sample = (as_u32c(src) << 8) ^ 0x80000000; goto GET32_END;
#  537|-> get32_1230_3210: sample = bswap_32(as_u32c(src) >> 8); goto GET32_END;
#  538|   get32_1230_B210: sample = bswap_32((as_u32c(src) >> 8) ^ 0x80); goto GET32_END;
#  539|   get32_1234_1234: sample = as_u32c(src); goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def80]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:538:27: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:538:27: danger: use of uninitialized value 'src' here
#  536|   get32_0123_9230: sample = (as_u32c(src) << 8) ^ 0x80000000; goto GET32_END;
#  537|   get32_1230_3210: sample = bswap_32(as_u32c(src) >> 8); goto GET32_END;
#  538|-> get32_1230_B210: sample = bswap_32((as_u32c(src) >> 8) ^ 0x80); goto GET32_END;
#  539|   get32_1234_1234: sample = as_u32c(src); goto GET32_END;
#  540|   get32_1234_9234: sample = as_u32c(src) ^ 0x80000000; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def81]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:539:27: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:539:27: danger: use of uninitialized value 'src' here
#  537|   get32_1230_3210: sample = bswap_32(as_u32c(src) >> 8); goto GET32_END;
#  538|   get32_1230_B210: sample = bswap_32((as_u32c(src) >> 8) ^ 0x80); goto GET32_END;
#  539|-> get32_1234_1234: sample = as_u32c(src); goto GET32_END;
#  540|   get32_1234_9234: sample = as_u32c(src) ^ 0x80000000; goto GET32_END;
#  541|   get32_1234_4321: sample = bswap_32(as_u32c(src)); goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def82]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:540:27: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:540:27: danger: use of uninitialized value 'src' here
#  538|   get32_1230_B210: sample = bswap_32((as_u32c(src) >> 8) ^ 0x80); goto GET32_END;
#  539|   get32_1234_1234: sample = as_u32c(src); goto GET32_END;
#  540|-> get32_1234_9234: sample = as_u32c(src) ^ 0x80000000; goto GET32_END;
#  541|   get32_1234_4321: sample = bswap_32(as_u32c(src)); goto GET32_END;
#  542|   get32_1234_C321: sample = bswap_32(as_u32c(src) ^ 0x80); goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def83]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:542:27: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:542:27: danger: use of uninitialized value 'src' here
#  540|   get32_1234_9234: sample = as_u32c(src) ^ 0x80000000; goto GET32_END;
#  541|   get32_1234_4321: sample = bswap_32(as_u32c(src)); goto GET32_END;
#  542|-> get32_1234_C321: sample = bswap_32(as_u32c(src) ^ 0x80); goto GET32_END;
#  543|   get32_0123_1230_20: sample = as_u32c(src) << 12; goto GET32_END;
#  544|   get32_0123_9230_20: sample = (as_u32c(src) << 12) ^ 0x80000000; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def84]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:543:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:543:30: danger: use of uninitialized value 'src' here
#  541|   get32_1234_4321: sample = bswap_32(as_u32c(src)); goto GET32_END;
#  542|   get32_1234_C321: sample = bswap_32(as_u32c(src) ^ 0x80); goto GET32_END;
#  543|-> get32_0123_1230_20: sample = as_u32c(src) << 12; goto GET32_END;
#  544|   get32_0123_9230_20: sample = (as_u32c(src) << 12) ^ 0x80000000; goto GET32_END;
#  545|   get32_1230_3210_20: sample = bswap_32(as_u32c(src)) << 12; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def85]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:544:31: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:544:31: danger: use of uninitialized value 'src' here
#  542|   get32_1234_C321: sample = bswap_32(as_u32c(src) ^ 0x80); goto GET32_END;
#  543|   get32_0123_1230_20: sample = as_u32c(src) << 12; goto GET32_END;
#  544|-> get32_0123_9230_20: sample = (as_u32c(src) << 12) ^ 0x80000000; goto GET32_END;
#  545|   get32_1230_3210_20: sample = bswap_32(as_u32c(src)) << 12; goto GET32_END;
#  546|   get32_1230_B210_20: sample = (bswap_32(as_u32c(src)) << 12) ^ 0x80000000; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def86]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:547:26: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:547:26: danger: use of uninitialized value 'src' here
#  545|   get32_1230_3210_20: sample = bswap_32(as_u32c(src)) << 12; goto GET32_END;
#  546|   get32_1230_B210_20: sample = (bswap_32(as_u32c(src)) << 12) ^ 0x80000000; goto GET32_END;
#  547|-> get32_123_1230: sample = _get_triple(src) << 8; goto GET32_END;
#  548|   get32_123_9230: sample = (_get_triple(src) << 8) ^ 0x80000000; goto GET32_END;
#  549|   get32_123_3210: sample = _get_triple_s(src) << 8; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def87]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:548:27: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:548:27: danger: use of uninitialized value 'src' here
#  546|   get32_1230_B210_20: sample = (bswap_32(as_u32c(src)) << 12) ^ 0x80000000; goto GET32_END;
#  547|   get32_123_1230: sample = _get_triple(src) << 8; goto GET32_END;
#  548|-> get32_123_9230: sample = (_get_triple(src) << 8) ^ 0x80000000; goto GET32_END;
#  549|   get32_123_3210: sample = _get_triple_s(src) << 8; goto GET32_END;
#  550|   get32_123_B210: sample = (_get_triple_s(src) << 8) ^ 0x80000000; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def88]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:549:26: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:549:26: danger: use of uninitialized value 'src' here
#  547|   get32_123_1230: sample = _get_triple(src) << 8; goto GET32_END;
#  548|   get32_123_9230: sample = (_get_triple(src) << 8) ^ 0x80000000; goto GET32_END;
#  549|-> get32_123_3210: sample = _get_triple_s(src) << 8; goto GET32_END;
#  550|   get32_123_B210: sample = (_get_triple_s(src) << 8) ^ 0x80000000; goto GET32_END;
#  551|   get32_123_1230_20: sample = _get_triple(src) << 12; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def89]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:550:27: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:550:27: danger: use of uninitialized value 'src' here
#  548|   get32_123_9230: sample = (_get_triple(src) << 8) ^ 0x80000000; goto GET32_END;
#  549|   get32_123_3210: sample = _get_triple_s(src) << 8; goto GET32_END;
#  550|-> get32_123_B210: sample = (_get_triple_s(src) << 8) ^ 0x80000000; goto GET32_END;
#  551|   get32_123_1230_20: sample = _get_triple(src) << 12; goto GET32_END;
#  552|   get32_123_9230_20: sample = (_get_triple(src) << 12) ^ 0x80000000; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def90]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:551:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:551:29: danger: use of uninitialized value 'src' here
#  549|   get32_123_3210: sample = _get_triple_s(src) << 8; goto GET32_END;
#  550|   get32_123_B210: sample = (_get_triple_s(src) << 8) ^ 0x80000000; goto GET32_END;
#  551|-> get32_123_1230_20: sample = _get_triple(src) << 12; goto GET32_END;
#  552|   get32_123_9230_20: sample = (_get_triple(src) << 12) ^ 0x80000000; goto GET32_END;
#  553|   get32_123_3210_20: sample = _get_triple_s(src) << 12; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def91]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:552:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:552:30: danger: use of uninitialized value 'src' here
#  550|   get32_123_B210: sample = (_get_triple_s(src) << 8) ^ 0x80000000; goto GET32_END;
#  551|   get32_123_1230_20: sample = _get_triple(src) << 12; goto GET32_END;
#  552|-> get32_123_9230_20: sample = (_get_triple(src) << 12) ^ 0x80000000; goto GET32_END;
#  553|   get32_123_3210_20: sample = _get_triple_s(src) << 12; goto GET32_END;
#  554|   get32_123_B210_20: sample = (_get_triple_s(src) << 12) ^ 0x80000000; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def92]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:553:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:553:29: danger: use of uninitialized value 'src' here
#  551|   get32_123_1230_20: sample = _get_triple(src) << 12; goto GET32_END;
#  552|   get32_123_9230_20: sample = (_get_triple(src) << 12) ^ 0x80000000; goto GET32_END;
#  553|-> get32_123_3210_20: sample = _get_triple_s(src) << 12; goto GET32_END;
#  554|   get32_123_B210_20: sample = (_get_triple_s(src) << 12) ^ 0x80000000; goto GET32_END;
#  555|   get32_123_1230_18: sample = _get_triple(src) << 14; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def93]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:554:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:554:30: danger: use of uninitialized value 'src' here
#  552|   get32_123_9230_20: sample = (_get_triple(src) << 12) ^ 0x80000000; goto GET32_END;
#  553|   get32_123_3210_20: sample = _get_triple_s(src) << 12; goto GET32_END;
#  554|-> get32_123_B210_20: sample = (_get_triple_s(src) << 12) ^ 0x80000000; goto GET32_END;
#  555|   get32_123_1230_18: sample = _get_triple(src) << 14; goto GET32_END;
#  556|   get32_123_9230_18: sample = (_get_triple(src) << 14) ^ 0x80000000; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def94]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:555:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:555:29: danger: use of uninitialized value 'src' here
#  553|   get32_123_3210_20: sample = _get_triple_s(src) << 12; goto GET32_END;
#  554|   get32_123_B210_20: sample = (_get_triple_s(src) << 12) ^ 0x80000000; goto GET32_END;
#  555|-> get32_123_1230_18: sample = _get_triple(src) << 14; goto GET32_END;
#  556|   get32_123_9230_18: sample = (_get_triple(src) << 14) ^ 0x80000000; goto GET32_END;
#  557|   get32_123_3210_18: sample = _get_triple_s(src) << 14; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def95]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:556:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:556:30: danger: use of uninitialized value 'src' here
#  554|   get32_123_B210_20: sample = (_get_triple_s(src) << 12) ^ 0x80000000; goto GET32_END;
#  555|   get32_123_1230_18: sample = _get_triple(src) << 14; goto GET32_END;
#  556|-> get32_123_9230_18: sample = (_get_triple(src) << 14) ^ 0x80000000; goto GET32_END;
#  557|   get32_123_3210_18: sample = _get_triple_s(src) << 14; goto GET32_END;
#  558|   get32_123_B210_18: sample = (_get_triple_s(src) << 14) ^ 0x80000000; goto GET32_END;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def96]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:557:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:557:29: danger: use of uninitialized value 'src' here
#  555|   get32_123_1230_18: sample = _get_triple(src) << 14; goto GET32_END;
#  556|   get32_123_9230_18: sample = (_get_triple(src) << 14) ^ 0x80000000; goto GET32_END;
#  557|-> get32_123_3210_18: sample = _get_triple_s(src) << 14; goto GET32_END;
#  558|   get32_123_B210_18: sample = (_get_triple_s(src) << 14) ^ 0x80000000; goto GET32_END;
#  559|   }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def97]
alsa-lib-1.2.14/src/pcm/plugin_ops.h:558:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'src'
alsa-lib-1.2.14/src/pcm/pcm_route.c:284:12: branch_false: following 'false' branch (when 'srcidx1 != 0')...
alsa-lib-1.2.14/src/pcm/pcm_route.c:290:19: branch_false: ...to here
alsa-lib-1.2.14/src/pcm/pcm_route.c:312:16: branch_true: following 'true' branch (when 'frames != 0')...
 branch_true: ...to here
alsa-lib-1.2.14/src/pcm/plugin_ops.h:558:30: danger: use of uninitialized value 'src' here
#  556|   get32_123_9230_18: sample = (_get_triple(src) << 14) ^ 0x80000000; goto GET32_END;
#  557|   get32_123_3210_18: sample = _get_triple_s(src) << 14; goto GET32_END;
#  558|-> get32_123_B210_18: sample = (_get_triple_s(src) << 14) ^ 0x80000000; goto GET32_END;
#  559|   }
#  560|   #endif

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
alsa-lib-1.2.14/src/rawmidi/rawmidi_hw.c:137:25: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
alsa-lib-1.2.14/src/rawmidi/rawmidi_hw.c:110:12: enter_function: entry to 'snd_rawmidi_hw_params'
alsa-lib-1.2.14/src/rawmidi/rawmidi_hw.c:115:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/rawmidi/rawmidi_hw.c:119:9: call_function: inlined call to 'buf_reset' from 'snd_rawmidi_hw_params'
alsa-lib-1.2.14/src/rawmidi/rawmidi_hw.c:121:13: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/rawmidi/rawmidi_hw.c:129:30: branch_false: ...to here
alsa-lib-1.2.14/src/rawmidi/rawmidi_hw.c:132:20: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/rawmidi/rawmidi_hw.c:133:39: branch_true: ...to here
alsa-lib-1.2.14/src/rawmidi/rawmidi_hw.c:134:28: branch_false: following 'false' branch (when 'buf' is non-NULL)...
alsa-lib-1.2.14/src/rawmidi/rawmidi_hw.c:136:25: branch_false: ...to here
alsa-lib-1.2.14/src/rawmidi/rawmidi_hw.c:137:25: danger: 'buf' leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  135|   				return -ENOMEM;
#  136|   			hw->buf = buf;
#  137|-> 			hw->buf_size = alloc_size;
#  138|   		}
#  139|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:393:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:326:12: branch_false: following 'false' branch (when 'virt' is non-NULL)...
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:330:9: branch_false: ...to here
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:333:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:335:9: branch_false: ...to here
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:338:12: branch_true: following 'true' branch (when 'inputp' is non-NULL)...
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:339:25: branch_true: ...to here
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:340:20: branch_false: following 'false' branch (when 'rmidi' is non-NULL)...
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:344:20: branch_false: ...to here
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:344:20: branch_true: following 'true' branch (when 'name' is non-NULL)...
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:345:39: branch_true: ...to here
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:345:39: acquire_memory: allocated here
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:350:20: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:351:25: branch_true: ...to here
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:382:12: branch_false: following 'false' branch (when 'seq_handle' is NULL)...
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:384:12: branch_false: ...to here
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:384:12: branch_true: following 'true' branch (when 'virt' is non-NULL)...
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:385:21: branch_true: ...to here
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:385:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:387:17: branch_false: ...to here
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:389:12: branch_true: following 'true' branch (when 'inputp' is non-NULL)...
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:390:17: branch_true: ...to here
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:391:12: branch_false: following 'false' branch (when 'outputp' is NULL)...
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:393:9: branch_false: ...to here
alsa-lib-1.2.14/src/rawmidi/rawmidi_virt.c:393:9: danger: '<unknown>' leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  391|   	if (outputp)
#  392|   		free(*outputp);
#  393|-> 	free(rmidi);
#  394|   	return err;
#  395|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def100]
alsa-lib-1.2.14/src/seq/seq.c:994:23: warning[-Wanalyzer-jump-through-null]: jump through null pointer
alsa-lib-1.2.14/src/seq/seq.c:915:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/seq/seq.c:922:15: branch_false: ...to here
alsa-lib-1.2.14/src/seq/seq.c:923:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/seq/seq.c:927:15: branch_false: ...to here
alsa-lib-1.2.14/src/seq/seq.c:928:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/seq/seq.c:932:15: branch_false: ...to here
alsa-lib-1.2.14/src/seq/seq.c:933:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/seq/seq.c:937:15: branch_false: ...to here
alsa-lib-1.2.14/src/seq/seq.c:938:12: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/seq/seq.c:939:21: branch_true: ...to here
alsa-lib-1.2.14/src/seq/seq.c:993:12: branch_true: following 'true' branch (when 'err == 0')...
alsa-lib-1.2.14/src/seq/seq.c:994:23: branch_true: ...to here
alsa-lib-1.2.14/src/seq/seq.c:994:23: danger: jump through null pointer here
#  992|   		snd_config_delete(type_conf);
#  993|   	if (! err) {
#  994|-> 		err = open_func(seqp, name, seq_root, seq_conf, streams, mode);
#  995|   		if (err < 0)
#  996|   			snd_dlclose(h);

Error: CPPCHECK_WARNING (CWE-457): [#def101]
alsa-lib-1.2.14/src/seq/seqmid.c:567: error[legacyUninitvar]: Uninitialized variable: *&pinfo
#  565|   	}
#  566|   
#  567|-> 	snd_seq_port_info_alloca(&pinfo);
#  568|   
#  569|   	snd_seq_port_info_set_port(pinfo, 0);

Error: CPPCHECK_WARNING (CWE-457): [#def102]
alsa-lib-1.2.14/src/seq/seqmid.c:629: error[legacyUninitvar]: Uninitialized variable: *&pinfo
#  627|   	snd_ump_block_info_t *bp;
#  628|   
#  629|-> 	snd_seq_port_info_alloca(&pinfo);
#  630|   
#  631|   	for (i = 0; i < seq->num_ump_groups; i++) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def103]
alsa-lib-1.2.14/src/timer/timer.c:169:23: warning[-Wanalyzer-jump-through-null]: jump through null pointer
alsa-lib-1.2.14/src/timer/timer.c:90:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/timer/timer.c:97:15: branch_false: ...to here
alsa-lib-1.2.14/src/timer/timer.c:98:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/timer/timer.c:102:15: branch_false: ...to here
alsa-lib-1.2.14/src/timer/timer.c:103:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/timer/timer.c:107:15: branch_false: ...to here
alsa-lib-1.2.14/src/timer/timer.c:108:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/timer/timer.c:112:15: branch_false: ...to here
alsa-lib-1.2.14/src/timer/timer.c:113:12: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/timer/timer.c:114:21: branch_true: ...to here
alsa-lib-1.2.14/src/timer/timer.c:168:12: branch_true: following 'true' branch (when 'err == 0')...
alsa-lib-1.2.14/src/timer/timer.c:169:23: branch_true: ...to here
alsa-lib-1.2.14/src/timer/timer.c:169:23: danger: jump through null pointer here
#  167|   		snd_config_delete(type_conf);
#  168|   	if (! err) {
#  169|-> 		err = open_func(timer, name, timer_root, timer_conf, mode);
#  170|   		if (err < 0)
#  171|   			snd_dlclose(h);

Error: CPPCHECK_WARNING (CWE-457): [#def104]
alsa-lib-1.2.14/src/topology/data.c:1905: error[uninitvar]: Uninitialized variable: id
# 1903|   			if (err < 0)
# 1904|   				return err;
# 1905|-> 			err = tplg_ref_add(elem2, SND_TPLG_TYPE_TUPLE, id);
# 1906|   			if (err < 0)
# 1907|   				return err;

Error: CPPCHECK_WARNING (CWE-401): [#def105]
alsa-lib-1.2.14/src/topology/elem.c:257: error[memleak]: Memory leak: ref
#  255|   
#  256|   	list_add_tail(&ref->list, &elem->ref_list);
#  257|-> 	return 0;
#  258|   }
#  259|   

Error: CPPCHECK_WARNING (CWE-401): [#def106]
alsa-lib-1.2.14/src/topology/elem.c:274: error[memleak]: Memory leak: ref
#  272|   
#  273|   	list_add_tail(&ref->list, &elem->ref_list);
#  274|-> 	return 0;
#  275|   }
#  276|   

Error: CPPCHECK_WARNING (CWE-401): [#def107]
alsa-lib-1.2.14/src/topology/elem.c:499: error[memleak]: Memory leak: a
#  497|   		return NULL;
#  498|   	list_add_tail(&a->list, heap);
#  499|-> 	return a->data;
#  500|   }
#  501|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def108]
alsa-lib-1.2.14/src/topology/pcm.c:2250:25: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
alsa-lib-1.2.14/src/topology/pcm.c:2158:12: branch_false: following 'false' branch...
 branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2167:12: branch_false: following 'false' branch (when 'size > 1655')...
alsa-lib-1.2.14/src/topology/pcm.c:2171:30: branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2171:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2176:13: branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2176:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2180:13: branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2180:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2184:29: branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2184:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2189:9: branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2204:21: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2221:9: branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2222:21: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2224:21: branch_true: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2224:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2229:26: branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2245:20: branch_false: following 'false' branch...
 branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2249:29: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2250:25: branch_true: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2250:25: release_memory: '0' is NULL
alsa-lib-1.2.14/src/topology/pcm.c:2250:39: release_memory: '0' is NULL
alsa-lib-1.2.14/src/topology/pcm.c:2250:25: danger: dereference of NULL 'hws[i].tx_chanmap + (long unsigned int)j * 4'
# 2248|   		}
# 2249|   		for (j = 0; j < hw->tx_channels; j++)
# 2250|-> 			hw->tx_chanmap[j] = link->hw_config[i].tx_chanmap[j];
# 2251|   		hw->rx_channels = link->hw_config[i].rx_channels;
# 2252|   		if (hw->rx_channels > SND_SOC_TPLG_MAX_CHAN) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def109]
alsa-lib-1.2.14/src/topology/pcm.c:2257:25: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
alsa-lib-1.2.14/src/topology/pcm.c:2158:12: branch_false: following 'false' branch...
 branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2167:12: branch_false: following 'false' branch (when 'size > 1655')...
alsa-lib-1.2.14/src/topology/pcm.c:2171:30: branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2171:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2176:13: branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2176:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2180:13: branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2180:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2184:29: branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2184:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2189:9: branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2204:21: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2221:9: branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2222:21: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2224:21: branch_true: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2224:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2229:26: branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2245:20: branch_false: following 'false' branch...
 branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2249:29: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2251:35: branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2252:20: branch_false: following 'false' branch...
 branch_false: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2256:29: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/topology/pcm.c:2257:25: branch_true: ...to here
alsa-lib-1.2.14/src/topology/pcm.c:2257:25: release_memory: '0' is NULL
alsa-lib-1.2.14/src/topology/pcm.c:2257:39: release_memory: '0' is NULL
alsa-lib-1.2.14/src/topology/pcm.c:2257:25: danger: dereference of NULL 'hws[i].rx_chanmap + (long unsigned int)j * 4'
# 2255|   		}
# 2256|   		for (j = 0; j < hw->rx_channels; j++)
# 2257|-> 			hw->rx_chanmap[j] = link->hw_config[i].rx_chanmap[j];
# 2258|   	}
# 2259|   	lt.hw_config = hws;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def110]
alsa-lib-1.2.14/src/topology/save.c:96:9: warning[-Wanalyzer-null-argument]: use of NULL 'buf.printf_buf' where non-null expected
alsa-lib-1.2.14/src/topology/save.c:557:5: enter_function: entry to 'snd_tplg_save'
alsa-lib-1.2.14/src/topology/save.c:565:9: branch_true: following 'true' branch (when 'tplg' is non-NULL)...
alsa-lib-1.2.14/src/topology/save.c:566:9: branch_true: ...to here
alsa-lib-1.2.14/src/topology/save.c:566:9: branch_true: following 'true' branch (when 'dst' is non-NULL)...
alsa-lib-1.2.14/src/topology/save.c:567:9: branch_true: ...to here
alsa-lib-1.2.14/src/topology/save.c:567:9: release_memory: '*dst' is NULL
alsa-lib-1.2.14/src/topology/save.c:569:9: call_function: calling 'tplg_buf_init' from 'snd_tplg_save'
alsa-lib-1.2.14/src/topology/save.c:569:9: return_function: returning to 'snd_tplg_save' from 'tplg_buf_init'
alsa-lib-1.2.14/src/topology/save.c:571:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/topology/save.c:586:23: branch_false: ...to here
alsa-lib-1.2.14/src/topology/save.c:586:23: call_function: calling 'tplg_save' from 'snd_tplg_save'
#argument 2 of '__builtin_strcpy' must be non-null
#   94|   	if (pl > 0)
#   95|   		strcpy(s + l, pfx);
#   96|-> 	strcpy(s + l + pl, dst->printf_buf);
#   97|   	dst->dst = s;
#   98|   	dst->dst_len = t - 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def111]
alsa-lib-1.2.14/src/topology/save.c:546:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'a'
alsa-lib-1.2.14/src/topology/save.c:557:5: enter_function: entry to 'snd_tplg_save'
alsa-lib-1.2.14/src/topology/save.c:565:9: branch_true: following 'true' branch (when 'tplg' is non-NULL)...
alsa-lib-1.2.14/src/topology/save.c:566:9: branch_true: ...to here
alsa-lib-1.2.14/src/topology/save.c:566:9: branch_true: following 'true' branch (when 'dst' is non-NULL)...
alsa-lib-1.2.14/src/topology/save.c:567:9: branch_true: ...to here
alsa-lib-1.2.14/src/topology/save.c:571:12: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/topology/save.c:572:23: branch_true: ...to here
alsa-lib-1.2.14/src/topology/save.c:572:23: call_function: calling 'tplg_index_groups' from 'snd_tplg_save'
#  544|   				a = b;
#  545|   			}
#  546|-> 			a[count++] = elem->index;
#  547|   		}
#  548|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def112]
alsa-lib-1.2.14/src/topology/save.c:549:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'a'
alsa-lib-1.2.14/src/topology/save.c:557:5: enter_function: entry to 'snd_tplg_save'
alsa-lib-1.2.14/src/topology/save.c:565:9: branch_true: following 'true' branch (when 'tplg' is non-NULL)...
alsa-lib-1.2.14/src/topology/save.c:566:9: branch_true: ...to here
alsa-lib-1.2.14/src/topology/save.c:566:9: branch_true: following 'true' branch (when 'dst' is non-NULL)...
alsa-lib-1.2.14/src/topology/save.c:567:9: branch_true: ...to here
alsa-lib-1.2.14/src/topology/save.c:571:12: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/topology/save.c:572:23: branch_true: ...to here
alsa-lib-1.2.14/src/topology/save.c:572:23: call_function: calling 'tplg_index_groups' from 'snd_tplg_save'
#  547|   		}
#  548|   	}
#  549|-> 	a[count] = -1;
#  550|   
#  551|   	qsort(a, count, sizeof(a[0]), tplg_index_compar);

Error: CPPCHECK_WARNING (CWE-476): [#def113]
alsa-lib-1.2.14/src/ucm/main.c:203: warning[nullPointer]: Possible null pointer dereference: tlv
#  201|   	/* Check if the tlv file specifies valid size. */
#  202|   	tlv = (struct snd_ctl_tlv *)(*res);
#  203|-> 	if (tlv->length + 2 * sizeof(unsigned int) != sz) {
#  204|   		uc_error("Invalid tlv size: %d", tlv->length);
#  205|   		err = -EINVAL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def114]
alsa-lib-1.2.14/src/ucm/main.c:458:23: warning[-Wanalyzer-null-dereference]: dereference of NULL 'info2'
alsa-lib-1.2.14/src/ucm/main.c:2691:5: enter_function: entry to 'snd_use_case_set'
alsa-lib-1.2.14/src/ucm/main.c:2699:12: branch_true: following 'true' branch (when the strings are equal)...
alsa-lib-1.2.14/src/ucm/main.c:2700:23: branch_true: ...to here
alsa-lib-1.2.14/src/ucm/main.c:2700:23: call_function: calling 'set_fixedboot_user' from 'snd_use_case_set'
#  456|   		if (type == SEQUENCE_ELEMENT_TYPE_CTL_REMOVE)
#  457|   			goto __ok;
#  458|-> 		err = __snd_ctl_add_elem_set(ctl, info2, info2->owner, info2->count);
#  459|   		if (err < 0) {
#  460|   			uc_error("unable to create new control");

Error: CPPCHECK_WARNING (CWE-401): [#def115]
alsa-lib-1.2.14/src/ucm/parser.c:1264: error[memleak]: Memory leak: curr
# 1262|   	list_add_tail(&curr->list, base);
# 1263|   	curr->data = val;
# 1264|-> 	return 0;
# 1265|   }
# 1266|   

Error: CPPCHECK_WARNING (CWE-401): [#def116]
alsa-lib-1.2.14/src/ucm/parser.c:1411: error[memleak]: Memory leak: modifier
# 1409|   	err = uc_mgr_evaluate_inplace(uc_mgr, cfg);
# 1410|   	if (err < 0)
# 1411|-> 		return err;
# 1412|   
# 1413|   	snd_config_for_each(i, next, cfg) {

Error: CPPCHECK_WARNING (CWE-401): [#def117]
alsa-lib-1.2.14/src/ucm/parser.c:1556: error[memleak]: Memory leak: device
# 1554|   	err = uc_mgr_evaluate_inplace(uc_mgr, cfg);
# 1555|   	if (err < 0)
# 1556|-> 		return err;
# 1557|   
# 1558|   	snd_config_for_each(i, next, cfg) {

Error: CPPCHECK_WARNING (CWE-401): [#def118]
alsa-lib-1.2.14/src/ucm/parser.c:1993: error[memleak]: Memory leak: verb
# 1991|   	list_add_tail(&verb->list, &uc_mgr->verb_list);
# 1992|   	if (use_case_name == NULL)
# 1993|-> 		return -EINVAL;
# 1994|   	verb->name = strdup(use_case_name);
# 1995|   	if (verb->name == NULL)

Error: CPPCHECK_WARNING (CWE-401): [#def119]
alsa-lib-1.2.14/src/ucm/parser.c:1996: error[memleak]: Memory leak: verb
# 1994|   	verb->name = strdup(use_case_name);
# 1995|   	if (verb->name == NULL)
# 1996|-> 		return -ENOMEM;
# 1997|   
# 1998|   	if (comment != NULL) {

Error: CPPCHECK_WARNING (CWE-401): [#def120]
alsa-lib-1.2.14/src/ucm/parser.c:2001: error[memleak]: Memory leak: verb
# 1999|   		verb->comment = strdup(comment);
# 2000|   		if (verb->comment == NULL)
# 2001|-> 			return -ENOMEM;
# 2002|   	}
# 2003|   

Error: CPPCHECK_WARNING (CWE-401): [#def121]
alsa-lib-1.2.14/src/ucm/parser.c:2001: error[memleak]: Memory leak: verb.name
# 1999|   		verb->comment = strdup(comment);
# 2000|   		if (verb->comment == NULL)
# 2001|-> 			return -ENOMEM;
# 2002|   	}
# 2003|   

Error: CPPCHECK_WARNING (CWE-401): [#def122]
alsa-lib-1.2.14/src/ucm/parser.c:2007: error[memleak]: Memory leak: verb
# 2005|   	err = uc_mgr_config_load_file(uc_mgr, file, &cfg);
# 2006|   	if (err < 0)
# 2007|-> 		return err;
# 2008|   
# 2009|   	/* in-place evaluation */

Error: CPPCHECK_WARNING (CWE-401): [#def123]
alsa-lib-1.2.14/src/ucm/parser.c:2007: error[memleak]: Memory leak: verb.comment
# 2005|   	err = uc_mgr_config_load_file(uc_mgr, file, &cfg);
# 2006|   	if (err < 0)
# 2007|-> 		return err;
# 2008|   
# 2009|   	/* in-place evaluation */

Error: CPPCHECK_WARNING (CWE-457): [#def124]
alsa-lib-1.2.14/src/ucm/parser.c:2537: error[legacyUninitvar]: Uninitialized variable: *&info
# 2535|   	const char *_driver, *_name, *_long_name;
# 2536|   
# 2537|-> 	snd_ctl_card_info_alloca(&info);
# 2538|   
# 2539|   	card = -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
alsa-lib-1.2.14/src/ucm/parser.c:3050:25: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
alsa-lib-1.2.14/src/ucm/parser.c:2900:5: enter_function: entry to 'uc_mgr_scan_master_configs'
alsa-lib-1.2.14/src/ucm/parser.c:2917:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/parser.c:2919:21: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:2937:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/parser.c:2945:9: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:2961:12: branch_false: following 'false' branch (when 'list' is non-NULL)...
alsa-lib-1.2.14/src/ucm/parser.c:2966:9: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:2967:16: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/ucm/parser.c:2968:23: branch_true: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:2969:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/parser.c:2971:21: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:2971:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/parser.c:2973:17: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:2977:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/parser.c:2981:23: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:2988:27: acquire_memory: allocated here
alsa-lib-1.2.14/src/ucm/parser.c:2989:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/parser.c:2994:21: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:2969:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/parser.c:2971:21: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:2998:21: branch_true: following 'true' branch...
alsa-lib-1.2.14/src/ucm/parser.c:3000:34: branch_true: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:3003:17: call_function: calling 'ucm_filename' from 'uc_mgr_scan_master_configs'
alsa-lib-1.2.14/src/ucm/parser.c:3003:17: return_function: returning to 'uc_mgr_scan_master_configs' from 'ucm_filename'
alsa-lib-1.2.14/src/ucm/parser.c:3005:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/parser.c:3011:23: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:3012:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/parser.c:3014:23: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:3015:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/parser.c:3020:23: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:3021:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/parser.c:3026:21: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:3026:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/parser.c:3031:23: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:3032:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/parser.c:3039:17: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:3041:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/parser.c:3045:21: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:3045:20: branch_true: following 'true' branch (when the strings are equal)...
alsa-lib-1.2.14/src/ucm/parser.c:3048:49: branch_true: ...to here
alsa-lib-1.2.14/src/ucm/parser.c:3050:25: danger: '<unknown>' leaks here; was allocated at [(16)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/15)
# 3048|   			const char *save2 = list[j + 1];
# 3049|   			memmove(list + 2, list, j * sizeof(char *));
# 3050|-> 			list[0] = save1;
# 3051|   			list[1] = save2;
# 3052|   		}

Error: CPPCHECK_WARNING (CWE-457): [#def126]
alsa-lib-1.2.14/src/ucm/ucm_cond.c:192: error[legacyUninitvar]: Uninitialized variable: *&elem_id
#  190|   	int err, i, items;
#  191|   
#  192|-> 	snd_ctl_elem_id_alloca(&elem_id);
#  193|   	snd_ctl_elem_info_alloca(&elem_info);
#  194|   

Error: CPPCHECK_WARNING (CWE-457): [#def127]
alsa-lib-1.2.14/src/ucm/ucm_cond.c:193: error[legacyUninitvar]: Uninitialized variable: *&elem_info
#  191|   
#  192|   	snd_ctl_elem_id_alloca(&elem_id);
#  193|-> 	snd_ctl_elem_info_alloca(&elem_info);
#  194|   
#  195|   	err = get_string(eval, "Device", &device);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def128]
alsa-lib-1.2.14/src/ucm/ucm_exec.c:176:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'argv'
alsa-lib-1.2.14/src/ucm/ucm_exec.c:184:5: enter_function: entry to 'uc_mgr_exec'
alsa-lib-1.2.14/src/ucm/ucm_exec.c:194:13: call_function: calling 'parse_args' from 'uc_mgr_exec'
#  174|   		}
#  175|   	}
#  176|-> 	(*argv)[i] = NULL;
#  177|   	return 0;
#  178|   }

Error: GCC_ANALYZER_WARNING: [#def129]
alsa-lib-1.2.14/src/ucm/ucm_exec.c:251:17: warning[-Wanalyzer-fd-use-without-check]: 'dup2' on possibly invalid file descriptor '0'
alsa-lib-1.2.14/src/ucm/ucm_exec.c:184:5: enter_function: entry to 'uc_mgr_exec'
alsa-lib-1.2.14/src/ucm/ucm_exec.c:194:13: call_function: calling 'parse_args' from 'uc_mgr_exec'
alsa-lib-1.2.14/src/ucm/ucm_exec.c:194:13: return_function: returning to 'uc_mgr_exec' from 'parse_args'
alsa-lib-1.2.14/src/ucm/ucm_exec.c:194:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/ucm_exec.c:197:16: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:198:12: branch_false: following 'false' branch (when 'prog' is non-NULL)...
alsa-lib-1.2.14/src/ucm/ucm_exec.c:202:13: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:231:12: branch_false: following 'false' branch (when 'p != -1')...
alsa-lib-1.2.14/src/ucm/ucm_exec.c:239:12: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:239:12: branch_true: following 'true' branch (when 'p == 0')...
alsa-lib-1.2.14/src/ucm/ucm_exec.c:240:21: branch_true: ...to here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:241:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/ucm_exec.c:247:17: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:247:17: release_resource: closed here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:251:17: danger: '0' could be invalid
#  249|   		close(2);
#  250|   
#  251|-> 		dup2(f, 0);
#  252|   		dup2(f, 1);
#  253|   		dup2(f, 2);

Error: GCC_ANALYZER_WARNING: [#def130]
alsa-lib-1.2.14/src/ucm/ucm_exec.c:252:17: warning[-Wanalyzer-fd-use-without-check]: 'dup2' on possibly invalid file descriptor '1'
alsa-lib-1.2.14/src/ucm/ucm_exec.c:184:5: enter_function: entry to 'uc_mgr_exec'
alsa-lib-1.2.14/src/ucm/ucm_exec.c:194:13: call_function: calling 'parse_args' from 'uc_mgr_exec'
alsa-lib-1.2.14/src/ucm/ucm_exec.c:194:13: return_function: returning to 'uc_mgr_exec' from 'parse_args'
alsa-lib-1.2.14/src/ucm/ucm_exec.c:194:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/ucm_exec.c:197:16: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:198:12: branch_false: following 'false' branch (when 'prog' is non-NULL)...
alsa-lib-1.2.14/src/ucm/ucm_exec.c:202:13: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:231:12: branch_false: following 'false' branch (when 'p != -1')...
alsa-lib-1.2.14/src/ucm/ucm_exec.c:239:12: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:239:12: branch_true: following 'true' branch (when 'p == 0')...
alsa-lib-1.2.14/src/ucm/ucm_exec.c:240:21: branch_true: ...to here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:241:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/ucm_exec.c:247:17: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:248:17: release_resource: closed here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:252:17: danger: '1' could be invalid
#  250|   
#  251|   		dup2(f, 0);
#  252|-> 		dup2(f, 1);
#  253|   		dup2(f, 2);
#  254|   

Error: GCC_ANALYZER_WARNING: [#def131]
alsa-lib-1.2.14/src/ucm/ucm_exec.c:253:17: warning[-Wanalyzer-fd-use-without-check]: 'dup2' on possibly invalid file descriptor '2'
alsa-lib-1.2.14/src/ucm/ucm_exec.c:184:5: enter_function: entry to 'uc_mgr_exec'
alsa-lib-1.2.14/src/ucm/ucm_exec.c:194:13: call_function: calling 'parse_args' from 'uc_mgr_exec'
alsa-lib-1.2.14/src/ucm/ucm_exec.c:194:13: return_function: returning to 'uc_mgr_exec' from 'parse_args'
alsa-lib-1.2.14/src/ucm/ucm_exec.c:194:12: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/ucm_exec.c:197:16: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:198:12: branch_false: following 'false' branch (when 'prog' is non-NULL)...
alsa-lib-1.2.14/src/ucm/ucm_exec.c:202:13: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:231:12: branch_false: following 'false' branch (when 'p != -1')...
alsa-lib-1.2.14/src/ucm/ucm_exec.c:239:12: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:239:12: branch_true: following 'true' branch (when 'p == 0')...
alsa-lib-1.2.14/src/ucm/ucm_exec.c:240:21: branch_true: ...to here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:241:20: branch_false: following 'false' branch...
alsa-lib-1.2.14/src/ucm/ucm_exec.c:247:17: branch_false: ...to here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:249:17: release_resource: closed here
alsa-lib-1.2.14/src/ucm/ucm_exec.c:253:17: danger: '2' could be invalid
#  251|   		dup2(f, 0);
#  252|   		dup2(f, 1);
#  253|-> 		dup2(f, 2);
#  254|   
#  255|   		close(f);

Error: CPPCHECK_WARNING (CWE-457): [#def132]
alsa-lib-1.2.14/src/ucm/utils.c:271: error[legacyUninitvar]: Uninitialized variable: *&info
#  269|   	int err, card, ucm_group, ucm_offset;
#  270|   
#  271|-> 	snd_ctl_card_info_alloca(&info);
#  272|   
#  273|   	ucm_group = _snd_is_ucm_device(device);

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-115.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namealsa-lib-1.2.14-2.fc43
store-results-to/tmp/tmp26yykemk/alsa-lib-1.2.14-2.fc43.tar.xz
time-created2025-04-25 12:01:19
time-finished2025-04-25 12:04:25
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp26yykemk/alsa-lib-1.2.14-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp26yykemk/alsa-lib-1.2.14-2.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9