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

Commit e4348f02 authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: ife: Adds bound checking for output resources" into dev/msm-4.14-camx

parents a041ea2b 345b6cd8
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1955,6 +1955,14 @@ static int cam_ife_mgr_acquire_hw(void *hw_mgr_priv, void *acquire_hw_args)

	/* acquire HW resources */
	for (i = 0; i < acquire_hw_info->num_inputs; i++) {

		if (in_port->num_out_res > CAM_IFE_HW_OUT_RES_MAX) {
			CAM_ERR(CAM_ISP, "too many output res %d",
				in_port->num_out_res);
			rc = -EINVAL;
			goto free_res;
		}

		in_port_length = sizeof(struct cam_isp_in_port_info) +
			(in_port->num_out_res - 1) *
			sizeof(struct cam_isp_out_port_info);