summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com>2022-01-16 18:32:24 -0800
committerSecurityBot <android-nexus-securitybot@system.gserviceaccount.com>2022-01-16 18:32:24 -0800
commitf7dc10fc947d693ffdc3de2f3796bd9e0fd9e803 (patch)
tree1853a44394a4d81adda2290811811aad8d717632
parent774ebf349f07a0d97be21f668c306011c26693e1 (diff)
parenta785bd90b184f3086c5a3f86b9abfbda89d06726 (diff)
downloadcamera-kernel-f7dc10fc947d693ffdc3de2f3796bd9e0fd9e803.tar.gz
SBMerger: 410055097 Change-Id: I6240ba278aced80054caaf0cea6864ecef4687e2 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;
}