Fixed findings

List of Findings

Error: CPPCHECK_WARNING (CWE-190): [#def1]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:220: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  218|   	info.props = &SPA_DICT_INIT(items, n_items);
#  219|   
#  220|-> 	spa_device_emit_object_info(&this->hooks, dev->index, &info);
#  221|   
#  222|   	return 0;

Error: CPPCHECK_WARNING (CWE-190): [#def2]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:267: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  265|   			}
#  266|   		}
#  267|-> 		spa_device_emit_info(&this->hooks, &this->info);
#  268|   		this->info.change_mask = old;
#  269|   	}

Error: CPPCHECK_WARNING (CWE-190): [#def3]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:315: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  313|   	spa_return_val_if_fail(this != NULL, -EINVAL);
#  314|   
#  315|-> 	spa_device_emit_result(&this->hooks, seq, 0, 0, NULL);
#  316|   
#  317|   	return 0;

Error: CPPCHECK_WARNING (CWE-190): [#def4]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:605: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  603|   		goto next;
#  604|   
#  605|-> 	spa_device_emit_result(&this->hooks, seq, 0,
#  606|   			SPA_RESULT_TYPE_DEVICE_PARAMS, &result);
#  607|   

Error: CPPCHECK_WARNING (CWE-190): [#def5]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:622: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  620|   	struct spa_pod_frame f[1];
#  621|   
#  622|-> 	spa_log_info(this->log, "device %s latency changed", dev->name);
#  623|   	this->info.change_mask |= SPA_DEVICE_CHANGE_MASK_PARAMS;
#  624|   	this->params[IDX_Route].user++;

Error: CPPCHECK_WARNING (CWE-190): [#def6]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:637: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  635|   	event = spa_pod_builder_pop(&b, &f[0]);
#  636|   
#  637|-> 	spa_device_emit_event(&this->hooks, event);
#  638|   }
#  639|   

Error: CPPCHECK_WARNING (CWE-190): [#def7]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:648: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  646|   	struct spa_pod_frame f[1];
#  647|   
#  648|-> 	spa_log_info(this->log, "device %s codecs changed", dev->name);
#  649|   	this->info.change_mask |= SPA_DEVICE_CHANGE_MASK_PARAMS;
#  650|   	this->params[IDX_Route].user++;

Error: CPPCHECK_WARNING (CWE-190): [#def8]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:664: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  662|   	event = spa_pod_builder_pop(&b, &f[0]);
#  663|   
#  664|-> 	spa_device_emit_event(&this->hooks, event);
#  665|   }
#  666|   

Error: CPPCHECK_WARNING (CWE-190): [#def9]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:814: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  812|   				SPA_PARAM_PROFILE_name, SPA_POD_OPT_String(&name),
#  813|   				SPA_PARAM_PROFILE_save, SPA_POD_OPT_Bool(&save))) < 0) {
#  814|-> 			spa_log_warn(this->log, "can't parse profile");
#  815|   			spa_debug_log_pod(this->log, SPA_LOG_LEVEL_DEBUG, 0, NULL, param);
#  816|   			return res;

Error: CPPCHECK_WARNING (CWE-190): [#def10]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:819: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  817|   		}
#  818|   		if (idx == SPA_ID_INVALID && name == NULL) {
#  819|-> 			spa_log_warn(this->log, "profile needs name or index");
#  820|   			return -EINVAL;
#  821|   		}

Error: CPPCHECK_WARNING (CWE-190): [#def11]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:825: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  823|   			idx = find_profile_by_name(this->card, name);
#  824|   		if (idx == SPA_ID_INVALID) {
#  825|-> 			spa_log_warn(this->log, "unknown profile %s", name);
#  826|   			return -EINVAL;
#  827|   		}

Error: CPPCHECK_WARNING (CWE-190): [#def12]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:850: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  848|   				SPA_PARAM_ROUTE_props, SPA_POD_OPT_Pod(&props),
#  849|   				SPA_PARAM_ROUTE_save, SPA_POD_OPT_Bool(&save))) < 0) {
#  850|-> 			spa_log_warn(this->log, "can't parse route");
#  851|   			spa_debug_log_pod(this->log, SPA_LOG_LEVEL_DEBUG, 0, NULL, param);
#  852|   			return res;

Error: CPPCHECK_WARNING (CWE-190): [#def13]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:893: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  891|   {
#  892|   	struct impl *this = data;
#  893|-> 	spa_log_info(this->log, "card properties changed");
#  894|   }
#  895|   

Error: CPPCHECK_WARNING (CWE-190): [#def14]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:914: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  912|   	uint32_t i;
#  913|   
#  914|-> 	spa_log_info(this->log, "card profile changed from %s to %s",
#  915|   			op->name, np->name);
#  916|   

Error: CPPCHECK_WARNING (CWE-190): [#def15]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:921: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  919|   		if (has_device(np, index))
#  920|   			continue;
#  921|-> 		spa_device_emit_object_info(&this->hooks, index, NULL);
#  922|   	}
#  923|   	for (i = 0; i < np->n_devices; i++) {

Error: CPPCHECK_WARNING (CWE-190): [#def16]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:941: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  939|   	struct acp_card_profile *p = card->profiles[index];
#  940|   
#  941|-> 	spa_log_info(this->log, "card profile %s available %s -> %s", p->name,
#  942|   			acp_available_str(old), acp_available_str(available));
#  943|   

Error: CPPCHECK_WARNING (CWE-190): [#def17]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:961: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  959|   	struct acp_port *np = card->ports[new_index];
#  960|   
#  961|-> 	spa_log_info(this->log, "card port changed from %s to %s",
#  962|   			op->name, np->name);
#  963|   

Error: CPPCHECK_WARNING (CWE-190): [#def18]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:975: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  973|   	struct acp_port *p = card->ports[index];
#  974|   
#  975|-> 	spa_log_info(this->log, "card port %s available %s -> %s", p->name,
#  976|   			acp_available_str(old), acp_available_str(available));
#  977|   

Error: CPPCHECK_WARNING (CWE-190): [#def19]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:1009: error[integerOverflow]: Signed integer overflow for expression '0-1'.
# 1007|   	float soft_volume[n_volume];
# 1008|   
# 1009|-> 	spa_log_info(this->log, "device %s volume changed", dev->name);
# 1010|   	this->info.change_mask |= SPA_DEVICE_CHANGE_MASK_PARAMS;
# 1011|   	this->params[IDX_Route].user++;

Error: CPPCHECK_WARNING (CWE-190): [#def20]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:1035: error[integerOverflow]: Signed integer overflow for expression '0-1'.
# 1033|   	event = spa_pod_builder_pop(&b, &f[0]);
# 1034|   
# 1035|-> 	spa_device_emit_event(&this->hooks, event);
# 1036|   }
# 1037|   

Error: CPPCHECK_WARNING (CWE-190): [#def21]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:1047: error[integerOverflow]: Signed integer overflow for expression '0-1'.
# 1045|   	bool mute;
# 1046|   
# 1047|-> 	spa_log_info(this->log, "device %s mute changed", dev->name);
# 1048|   	this->info.change_mask |= SPA_DEVICE_CHANGE_MASK_PARAMS;
# 1049|   	this->params[IDX_Route].user++;

Error: CPPCHECK_WARNING (CWE-190): [#def22]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:1066: error[integerOverflow]: Signed integer overflow for expression '0-1'.
# 1064|   	event = spa_pod_builder_pop(&b, &f[0]);
# 1065|   
# 1066|-> 	spa_device_emit_event(&this->hooks, event);
# 1067|   }
# 1068|   

Error: CPPCHECK_WARNING (CWE-190): [#def23]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:1150: error[integerOverflow]: Signed integer overflow for expression '0-1'.
# 1148|   	acp_i18n = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_I18N);
# 1149|   	if (this->loop == NULL) {
# 1150|-> 		spa_log_error(this->log, "a Loop interface is needed");
# 1151|   		return -EINVAL;
# 1152|   	}

Error: CPPCHECK_WARNING (CWE-190): [#def24]
pipewire-1.4.1/spa/plugins/alsa/alsa-acp-device.c:1178: error[integerOverflow]: Signed integer overflow for expression '0-1'.
# 1176|   	}
# 1177|   
# 1178|-> 	spa_log_debug(this->log, "probe card %s", this->props.device);
# 1179|   	if ((str = strchr(this->props.device, ':')) == NULL)
# 1180|   		return -EINVAL;

Error: CPPCHECK_WARNING (CWE-190): [#def25]
pipewire-1.4.1/spa/plugins/alsa/alsa-pcm-source.c:159: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  157|   		goto next;
#  158|   
#  159|-> 	spa_node_emit_result(&this->hooks, seq, 0, SPA_RESULT_TYPE_NODE_PARAMS, &result);
#  160|   
#  161|   	if (++count != num)

Error: CPPCHECK_WARNING (CWE-190): [#def26]
pipewire-1.4.1/spa/plugins/alsa/alsa-pcm-source.c:353: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  351|   	spa_return_val_if_fail(this != NULL, -EINVAL);
#  352|   
#  353|-> 	spa_node_emit_result(&this->hooks, seq, 0, 0, NULL);
#  354|   
#  355|   	return 0;

Error: CPPCHECK_WARNING (CWE-190): [#def27]
pipewire-1.4.1/spa/plugins/alsa/alsa-pcm-source.c:492: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  490|   		goto next;
#  491|   
#  492|-> 	spa_node_emit_result(&this->hooks, seq, 0, SPA_RESULT_TYPE_NODE_PARAMS, &result);
#  493|   
#  494|   	if (++count != num)

Error: CPPCHECK_WARNING (CWE-190): [#def28]
pipewire-1.4.1/spa/plugins/alsa/alsa-pcm-source.c:521: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  519|   			return 0;
#  520|   
#  521|-> 		spa_log_debug(this->log, "clear format");
#  522|   		spa_alsa_close(this);
#  523|   		clear_buffers(this);

Error: CPPCHECK_WARNING (CWE-190): [#def29]
pipewire-1.4.1/spa/plugins/alsa/alsa-pcm-source.c:637: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  635|   	spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
#  636|   
#  637|-> 	spa_log_debug(this->log, "%p: use %d buffers", this, n_buffers);
#  638|   
#  639|   	if (this->n_buffers > 0) {

Error: CPPCHECK_WARNING (CWE-190): [#def30]
pipewire-1.4.1/spa/plugins/alsa/alsa-pcm-source.c:660: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  658|   
#  659|   		if (d[0].data == NULL) {
#  660|-> 			spa_log_error(this->log, "%p: need mapped memory", this);
#  661|   			return -EINVAL;
#  662|   		}

Error: CPPCHECK_WARNING (CWE-190): [#def31]
pipewire-1.4.1/spa/plugins/alsa/alsa-pcm-source.c:683: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  681|   	spa_return_val_if_fail(CHECK_PORT(this, direction, port_id), -EINVAL);
#  682|   
#  683|-> 	spa_log_debug(this->log, "%p: io %d %p %zd", this, id, data, size);
#  684|   
#  685|   	switch (id) {

Error: CPPCHECK_WARNING (CWE-190): [#def32]
pipewire-1.4.1/spa/plugins/alsa/alsa-pcm-source.c:839: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  837|   
#  838|   	if (this->main_loop == NULL) {
#  839|-> 		spa_log_error(this->log, "a main loop is needed");
#  840|   		return -EINVAL;
#  841|   	}

Error: CPPCHECK_WARNING (CWE-190): [#def33]
pipewire-1.4.1/spa/plugins/alsa/alsa-pcm-source.c:843: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  841|   	}
#  842|   	if (this->data_loop == NULL) {
#  843|-> 		spa_log_error(this->log, "%p: a data loop is needed", this);
#  844|   		return -EINVAL;
#  845|   	}

Error: CPPCHECK_WARNING (CWE-190): [#def34]
pipewire-1.4.1/spa/plugins/alsa/alsa-pcm-source.c:847: error[integerOverflow]: Signed integer overflow for expression '0-1'.
#  845|   	}
#  846|   	if (this->data_system == NULL) {
#  847|-> 		spa_log_error(this->log, "%p: a data system is needed", this);
#  848|   		return -EINVAL;
#  849|   	}

Error: COMPILER_WARNING: [#def35]
pipewire-1.4.1/src/modules/module-raop-sink.c: scope_hint: In function ‘rtsp_do_post_auth_setup’
pipewire-1.4.1/src/modules/module-raop-sink.c:1335:17: warning[-Wunterminated-string-initialization]: initializer-string for array of ‘unsigned char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (34 chars into 33 available)
# 1335 |                 "\x01"
#      |                 ^~~~~~
# 1333|   {
# 1334|   	static const unsigned char content[33] =
# 1335|-> 		"\x01"
# 1336|   		"\x59\x02\xed\xe9\x0d\x4e\xf2\xbd\x4c\xb6\x8a\x63\x30\x03\x82\x07"
# 1337|   		"\xa9\x4d\xbd\x50\xd8\xaa\x46\x5b\x5d\x8c\x01\x2a\x0c\x7e\x1d\x4e";

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
diffbase-analyzer-version-clippy1.86.0
diffbase-analyzer-version-cppcheck2.17.1
diffbase-analyzer-version-gcc15.0.1
diffbase-analyzer-version-gcc-analyzer15.0.1
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-67.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namepipewire-1.4.2-1.fc43
diffbase-store-results-to/tmp/tmplb4d0ucm/pipewire-1.4.2-1.fc43.tar.xz
diffbase-time-created2025-04-25 15:05:28
diffbase-time-finished2025-04-25 15:20:09
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmplb4d0ucm/pipewire-1.4.2-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmplb4d0ucm/pipewire-1.4.2-1.fc43.src.rpm'
diffbase-tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-67.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-namepipewire-1.4.1-1.fc42
store-results-to/tmp/tmpgr7qr5oy/pipewire-1.4.1-1.fc42.tar.xz
time-created2025-04-25 14:49:40
time-finished2025-04-25 15:04:46
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpgr7qr5oy/pipewire-1.4.1-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpgr7qr5oy/pipewire-1.4.1-1.fc42.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9