mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
msm: camera: jpeg: Ensure in/out map entries are within allowed range
Added checks to make sure in_map /out_map entries of packet io configs are within expected maximum value. CRs-Fixed: 3007258 Change-Id: I7e5a652cd8f9ae104a10a2af551fe49930849b2d Signed-off-by: Shravya Samala <shravyas@codeaurora.org>
This commit is contained in:
parent
8d5da81f5d
commit
ed7d45ddc5
1 changed files with 5 additions and 4 deletions
|
|
@ -743,10 +743,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/io_configs info: %u %u %u",
|
||||
packet->num_cmd_buf, packet->num_patches, packet->num_io_configs);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue