Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3ede533 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: validate num_streams in stream_cfg_cmd before using it"

parents d0c698be 6599529e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -860,6 +860,12 @@ int msm_isp_cfg_stats_stream(struct vfe_device *vfe_dev, void *arg)
	if (vfe_dev->stats_data.num_active_stream == 0)
		vfe_dev->hw_info->vfe_ops.stats_ops.cfg_ub(vfe_dev);

	if (stream_cfg_cmd->num_streams > MSM_ISP_STATS_MAX) {
		pr_err("%s invalid num_streams %d\n", __func__,
			stream_cfg_cmd->num_streams);
		return -EINVAL;
	}

	if (stream_cfg_cmd->enable) {
		msm_isp_stats_update_cgc_override(vfe_dev, stream_cfg_cmd);