Skip to content
Snippets Groups Projects
Commit f96b4098 authored by Suman Mukherjee's avatar Suman Mukherjee Committed by Yuan Lin
Browse files

msm: camera: ispif: Validate VFE num input during reset

Userspace supplies the actual number of used VFEs in session to ISPIF.
Validate the userspace input value and if found to be invalid, return
error.

BUG=27600832

Change-Id: I91944434e9a83d34af765c40bf8ad297a09ce2f5
parent ffc9db1d
Branches
Tags
No related merge requests found
......@@ -778,6 +778,13 @@ static irqreturn_t msm_io_ispif_irq(int irq_num, void *data)
static int msm_ispif_set_vfe_info(struct ispif_device *ispif,
struct msm_ispif_vfe_info *vfe_info)
{
if (!vfe_info || (vfe_info->num_vfe <= 0) ||
((uint32_t)(vfe_info->num_vfe) > VFE_MAX)) {
pr_err("Invalid VFE info: %p %d\n", vfe_info,
(vfe_info ? vfe_info->num_vfe:0));
return -EINVAL;
}
memcpy(&ispif->vfe_info, vfe_info, sizeof(struct msm_ispif_vfe_info));
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment