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

Commit 0a0ebfa0 authored by Alok Chauhan's avatar Alok Chauhan
Browse files

msm: camera: ope: Add check for number of stripe



There is possibility that ope driver gets invalid
number of stripes. Add a check to validate it and
return failure to user-space.

CRs-Fixed: 2664479
Change-Id: Ic80d3376b853e500b793b0b5d051288f2a2640ba
Signed-off-by: default avatarAlok Chauhan <alokc@codeaurora.org>
parent 28a7d67a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1831,6 +1831,12 @@ static int cam_ope_mgr_process_cmd_io_buf_req(struct cam_ope_hw_mgr *hw_mgr,
				CAM_DBG(CAM_OPE, "m_hdl: %d len: %d",
					in_io_buf->mem_handle[k],
					in_io_buf->length[k]);

				if (!in_io_buf->num_stripes[k]) {
					CAM_ERR(CAM_OPE, "Null num_stripes");
					return -EINVAL;
				}

				for (l = 0; l < in_io_buf->num_stripes[k];
					l++) {
					in_stripe_info =