summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com>2022-01-16 18:32:27 -0800
committerSecurityBot <android-nexus-securitybot@system.gserviceaccount.com>2022-01-16 18:32:27 -0800
commit3f000c360614a611f8f7d7e198f250a9f3a51cb3 (patch)
tree1853a44394a4d81adda2290811811aad8d717632
parente76c32c7e5bc57af24c87af8df40f148ba535732 (diff)
parentf7dc10fc947d693ffdc3de2f3796bd9e0fd9e803 (diff)
downloadcamera-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.c9
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;
}