diff options
author | PixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com> | 2022-01-16 18:32:27 -0800 |
---|---|---|
committer | SecurityBot <android-nexus-securitybot@system.gserviceaccount.com> | 2022-01-16 18:32:27 -0800 |
commit | 3f000c360614a611f8f7d7e198f250a9f3a51cb3 (patch) | |
tree | 1853a44394a4d81adda2290811811aad8d717632 | |
parent | e76c32c7e5bc57af24c87af8df40f148ba535732 (diff) | |
parent | f7dc10fc947d693ffdc3de2f3796bd9e0fd9e803 (diff) | |
download | camera-kernel-3f000c360614a611f8f7d7e198f250a9f3a51cb3.tar.gz |
Merge android-msm-barbet-4.19-sc-qpr3 into android-msm-pixel-4.19
SBMerger: 410055097
Change-Id: Ia9c09a91f603fb7840570eeb305d959bcb675cf0
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r-- | drivers/cam_jpeg/jpeg_hw/cam_jpeg_hw_mgr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/cam_jpeg/jpeg_hw/cam_jpeg_hw_mgr.c b/drivers/cam_jpeg/jpeg_hw/cam_jpeg_hw_mgr.c index 4d6e4a4..c27b206 100644 --- a/drivers/cam_jpeg/jpeg_hw/cam_jpeg_hw_mgr.c +++ b/drivers/cam_jpeg/jpeg_hw/cam_jpeg_hw_mgr.c @@ -728,10 +728,11 @@ static int cam_jpeg_mgr_prepare_hw_update(void *hw_mgr_priv, } if ((packet->num_cmd_buf > 5) || !packet->num_patches || - !packet->num_io_configs) { - CAM_ERR(CAM_JPEG, "wrong number of cmd/patch info: %u %u", - packet->num_cmd_buf, - packet->num_patches); + !packet->num_io_configs || + (packet->num_io_configs > CAM_JPEG_IMAGE_MAX)) { + CAM_ERR(CAM_JPEG, "wrong number of cmd/patch info: %u %u %u", + packet->num_cmd_buf, packet->num_patches, + packet->num_io_configs); return -EINVAL; } |