Merge "msm: camera: jpeg: Ensure in/out map entries are within allowed range" into camera-kernel.lnx.4.0

This commit is contained in:
Camera Software Integration 2021-09-21 10:48:51 -07:00 коммит произвёл Gerrit - the friendly Code Review server
Родитель 1510d5b82f ed7d45ddc5
Коммит ff6c9be4dd
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -761,10 +761,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;
}