msm: camera: fix bound check of offset to avoid overread overwrite
fix bound check of hw_cmd_p->offset in msm_jpeg_hw_exec_cmds to avoid overread overwrite. CRs-Fixed: 1088824 Change-Id: Ifaa4b5387d4285ddce16d8e745aa0500c64c568b Signed-off-by: Krishnankutty Kolathappilly <kkolatha@codeaurora.org>
This commit is contained in:
parent
4a91ea36cb
commit
2dab9de1da
1 changed files with 1 additions and 1 deletions
|
@ -847,7 +847,7 @@ int msm_jpeg_hw_exec_cmds(struct msm_jpeg_hw_cmd *hw_cmd_p, uint32_t m_cmds,
|
|||
uint32_t data;
|
||||
|
||||
while (m_cmds--) {
|
||||
if (hw_cmd_p->offset > max_size) {
|
||||
if (hw_cmd_p->offset >= max_size) {
|
||||
JPEG_PR_ERR("%s:%d] %d exceed hw region %d\n", __func__,
|
||||
__LINE__, hw_cmd_p->offset, max_size);
|
||||
return -EFAULT;
|
||||
|
|
Loading…
Add table
Reference in a new issue