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

Commit 442caadc 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_v3: sensor: Subtract offset before validating cmd desc"

parents cfdb80fe ea9f618c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -338,6 +338,7 @@ int cam_sensor_i2c_command_parser(
		cmd_buf = (uint32_t *)generic_ptr;
		cmd_buf += cmd_desc[i].offset / sizeof(uint32_t);

		remain_len -= cmd_desc[i].offset;
		if (remain_len < cmd_desc[i].length) {
			CAM_ERR(CAM_SENSOR, "buffer provided too small");
			return -EINVAL;