Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c: scope_hint: In function ‘ucm_get_devices’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c:585:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘d’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/array.h:38:14: note: in expansion of macro ‘pa_array_check’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/proplist.h:53:9: note: in expansion of macro ‘pa_array_for_each’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/array.h:38:14: note: in expansion of macro ‘pa_array_check’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/proplist.h:53:9: note: in expansion of macro ‘pa_array_for_each’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/array.h:38:14: note: in expansion of macro ‘pa_array_check’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/proplist.h:53:9: note: in expansion of macro ‘pa_array_for_each’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/compat.h:251:33: note: in expansion of macro ‘pa_logl’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c:164:5: note: in expansion of macro ‘pa_log_debug’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/compat.h:251:33: note: in expansion of macro ‘pa_logl’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c:164:5: note: in expansion of macro ‘pa_log_debug’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/compat.h:242:9: note: in expansion of macro ‘pa_log_levelv_meta’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/compat.h:242:9: note: in expansion of macro ‘pa_log_levelv_meta’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/compat.h:251:33: note: in expansion of macro ‘pa_logl’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c:164:5: note: in expansion of macro ‘pa_log_debug’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c:583:33: note: in expansion of macro ‘pa_xnew0’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c:583:33: note: in expansion of macro ‘pa_xnew0’
#  583|           pa_alsa_ucm_device *d = pa_xnew0(pa_alsa_ucm_device, 1);
#  584|   
#  585|->         d->proplist = pa_proplist_new();
#  586|           pa_proplist_sets(d->proplist, PA_ALSA_PROP_UCM_NAME, pa_strnull(dev_list[i]));
#  587|           pa_proplist_sets(d->proplist, PA_ALSA_PROP_UCM_DESCRIPTION, pa_strna(dev_list[i + 1]));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c: scope_hint: In function ‘ucm_get_modifiers’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c:690:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘m’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/array.h:38:14: note: in expansion of macro ‘pa_array_check’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/proplist.h:53:9: note: in expansion of macro ‘pa_array_for_each’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/array.h:38:14: note: in expansion of macro ‘pa_array_check’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/proplist.h:53:9: note: in expansion of macro ‘pa_array_for_each’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/array.h:38:14: note: in expansion of macro ‘pa_array_check’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/proplist.h:53:9: note: in expansion of macro ‘pa_array_for_each’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/compat.h:251:33: note: in expansion of macro ‘pa_logl’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c:164:5: note: in expansion of macro ‘pa_log_debug’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/compat.h:251:33: note: in expansion of macro ‘pa_logl’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c:164:5: note: in expansion of macro ‘pa_log_debug’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/compat.h:242:9: note: in expansion of macro ‘pa_log_levelv_meta’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/compat.h:242:9: note: in expansion of macro ‘pa_log_levelv_meta’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/compat.h:251:33: note: in expansion of macro ‘pa_logl’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c:164:5: note: in expansion of macro ‘pa_log_debug’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c:689:13: note: in expansion of macro ‘pa_xnew0’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c:689:13: note: in expansion of macro ‘pa_xnew0’
#  688|   
#  689|           m = pa_xnew0(pa_alsa_ucm_modifier, 1);
#  690|->         m->proplist = pa_proplist_new();
#  691|   
#  692|           pa_proplist_sets(m->proplist, PA_ALSA_PROP_UCM_NAME, mod_list[i]);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c: scope_hint: In function ‘pa_alsa_ucm_get_verb.part.0’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c:973:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘verb’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/alsa-ucm.c:972:12: note: in expansion of macro ‘pa_xnew0’
#  971|   
#  972|       verb = pa_xnew0(pa_alsa_ucm_verb, 1);
#  973|->     verb->proplist = pa_proplist_new();
#  974|   
#  975|       pa_proplist_sets(verb->proplist, PA_ALSA_PROP_UCM_NAME, pa_strnull(verb_name));

Error: GCC_ANALYZER_WARNING (CWE-122): [#def4]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/proplist.h:99:21: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/array.h:38:14: note: in expansion of macro ‘pa_array_check’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/proplist.h:53:9: note: in expansion of macro ‘pa_array_for_each’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/array.h:38:14: note: in expansion of macro ‘pa_array_check’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/proplist.h:53:9: note: in expansion of macro ‘pa_array_for_each’
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/acp/proplist.h:99:21: note: write of 8 bytes to beyond the end of the region
#   97|                   item = pa_array_add(&p->array, sizeof(*item));
#   98|   	item->key = strdup(key);
#   99|-> 	item->value = strdup(value);
#  100|   	return 0;
#  101|   }

Error: CPPCHECK_WARNING (CWE-190): [#def5]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/alsa-pcm-device.c:207: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  205|   		if ((err = snd_ctl_pcm_info(ctl_hndl, pcminfo)) < 0) {
#  206|   			if (err != -ENOENT)
#  207|-> 				spa_log_error(this->log, "error pcm info: %s", snd_strerror(err));
#  208|   		}
#  209|   		if (err >= 0) {

Error: CPPCHECK_WARNING (CWE-190): [#def6]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/alsa-pcm-device.c:225: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  223|   	int err;
#  224|   
#  225|-> 	spa_log_debug(this->log, "enumerate PCM nodes for card %s; profile: %d",
#  226|   	              this->props.device, id);
#  227|   

Error: CPPCHECK_WARNING (CWE-190): [#def7]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/alsa-pcm-device.c:229: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  227|   
#  228|   	if ((err = snd_ctl_open(&ctl_hndl, this->props.device, 0)) < 0) {
#  229|-> 		spa_log_error(this->log, "can't open control for card %s: %s",
#  230|   				this->props.device, snd_strerror(err));
#  231|   		return err;

Error: CPPCHECK_WARNING (CWE-190): [#def8]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/alsa-pcm-device.c:236: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  234|   	err = activate_profile(this, ctl_hndl, id);
#  235|   
#  236|-> 	spa_log_debug(this->log, "done enumerating PCM nodes for card %s", this->props.device);
#  237|   	snd_ctl_close(ctl_hndl);
#  238|   

Error: CPPCHECK_WARNING (CWE-190): [#def9]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/alsa-pcm-device.c:259: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  257|   		snd_ctl_t *ctl_hndl;
#  258|   
#  259|-> 		spa_log_debug(this->log, "open card %s", this->props.device);
#  260|   		if ((err = snd_ctl_open(&ctl_hndl, this->props.device, 0)) < 0) {
#  261|   			spa_log_error(this->log, "can't open control for card %s: %s",

Error: CPPCHECK_WARNING (CWE-190): [#def10]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/alsa-pcm-device.c:261: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  259|   		spa_log_debug(this->log, "open card %s", this->props.device);
#  260|   		if ((err = snd_ctl_open(&ctl_hndl, this->props.device, 0)) < 0) {
#  261|-> 			spa_log_error(this->log, "can't open control for card %s: %s",
#  262|   					this->props.device, snd_strerror(err));
#  263|   			return err;

Error: CPPCHECK_WARNING (CWE-190): [#def11]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/alsa-pcm-device.c:269: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  267|   		err = snd_ctl_card_info(ctl_hndl, info);
#  268|   
#  269|-> 		spa_log_debug(this->log, "close card %s", this->props.device);
#  270|   		snd_ctl_close(ctl_hndl);
#  271|   

Error: CPPCHECK_WARNING (CWE-190): [#def12]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/alsa-pcm-device.c:273: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  271|   
#  272|   		if (err < 0) {
#  273|-> 			spa_log_error(this->log, "error hardware info: %s", snd_strerror(err));
#  274|   			return err;
#  275|   		}

Error: CPPCHECK_WARNING (CWE-190): [#def13]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/alsa-pcm-device.c:301: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  299|   		}
#  300|   
#  301|-> 		spa_device_emit_info(&this->hooks, &this->device_info);
#  302|   		this->device_info.change_mask = 0;
#  303|   	}

Error: CPPCHECK_WARNING (CWE-190): [#def14]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/alsa-pcm-device.c:336: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  334|   	spa_return_val_if_fail(this != NULL, -EINVAL);
#  335|   
#  336|-> 	spa_device_emit_result(&this->hooks, seq, 0, 0, NULL);
#  337|   
#  338|   	return 0;

Error: CPPCHECK_WARNING (CWE-190): [#def15]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/alsa-pcm-device.c:437: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  435|   		goto next;
#  436|   
#  437|-> 	spa_device_emit_result(&this->hooks, seq, 0,
#  438|   			SPA_RESULT_TYPE_DEVICE_PARAMS, &result);
#  439|   

Error: CPPCHECK_WARNING (CWE-190): [#def16]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/alsa-pcm-device.c:476: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  474|   				SPA_PARAM_PROFILE_index, SPA_POD_OPT_Int(&idx),
#  475|   				SPA_PARAM_PROFILE_name, SPA_POD_OPT_String(&name))) < 0) {
#  476|-> 			spa_log_warn(this->log, "can't parse profile");
#  477|   			spa_debug_log_pod(this->log, SPA_LOG_LEVEL_DEBUG, 0, NULL, param);
#  478|   			return res;

Error: CPPCHECK_WARNING (CWE-190): [#def17]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/alsa-pcm-device.c:481: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  479|   		}
#  480|   		if (idx == SPA_ID_INVALID && name == NULL) {
#  481|-> 			spa_log_warn(this->log, "profile needs name or index");
#  482|   			return -EINVAL;
#  483|   		}

Error: CPPCHECK_WARNING (CWE-190): [#def18]
pipewire-1.2.6-build/pipewire-1.2.6/spa/plugins/alsa/alsa-pcm-device.c:487: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  485|   			idx = find_profile_by_name(name);
#  486|   		if (idx == SPA_ID_INVALID) {
#  487|-> 			spa_log_warn(this->log, "unknown profile %s", name);
#  488|   			return -EINVAL;
#  489|   		}

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.82.0
diffbase-analyzer-version-cppcheck2.16.0
diffbase-analyzer-version-gcc14.2.1
diffbase-analyzer-version-gcc-analyzer15.0.0
diffbase-analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-227.us-west-2.compute.internal
diffbase-mock-configfedora-rawhide-gcc-latest-x86_64
diffbase-project-namepipewire-1.2.5-1.fc41
diffbase-store-results-to/tmp/tmpdezycrh7/pipewire-1.2.5-1.fc41.tar.xz
diffbase-time-created2024-11-13 02:19:11
diffbase-time-finished2024-11-13 02:32:51
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpdezycrh7/pipewire-1.2.5-1.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpdezycrh7/pipewire-1.2.5-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-227.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namepipewire-1.2.6-1.fc42
store-results-to/tmp/tmpuofmh28i/pipewire-1.2.6-1.fc42.tar.xz
time-created2024-11-13 02:33:15
time-finished2024-11-13 02:46:39
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpuofmh28i/pipewire-1.2.6-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpuofmh28i/pipewire-1.2.6-1.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9