Ver Fonte

msm: camera: sensor: Correct the datatype for request id

Request id is having uint64 type from request manager, but sensor
driver is handling it with int64. This may cause the out of bound
access while accessing the data. This change corrects the data
type to handle data correctly.

CRs-Fixed: 2759031
Change-Id: I607ea3c123a7b050403e18f7f1bac2a23e1e585f
Signed-off-by: Jigarkumar Zala <[email protected]>
Jigarkumar Zala há 5 anos atrás
pai
commit
3d671618a4

+ 1 - 1
drivers/cam_sensor_module/cam_sensor/cam_sensor_core.c

@@ -1236,7 +1236,7 @@ int cam_sensor_power_down(struct cam_sensor_ctrl_t *s_ctrl)
 }
 
 int cam_sensor_apply_settings(struct cam_sensor_ctrl_t *s_ctrl,
-	int64_t req_id, enum cam_sensor_packet_opcodes opcode)
+	uint64_t req_id, enum cam_sensor_packet_opcodes opcode)
 {
 	int rc = 0, offset, i;
 	uint64_t top = 0, del_req_id = 0;

+ 1 - 1
drivers/cam_sensor_module/cam_sensor/cam_sensor_core.h

@@ -37,7 +37,7 @@ int cam_sensor_power(struct v4l2_subdev *sd, int on);
  *
  * This API applies the req_id settings to sensor
  */
-int cam_sensor_apply_settings(struct cam_sensor_ctrl_t *s_ctrl, int64_t req_id,
+int cam_sensor_apply_settings(struct cam_sensor_ctrl_t *s_ctrl, uint64_t req_id,
 	enum cam_sensor_packet_opcodes opcode);
 
 /**