diff options
| author | Dan Carpenter <[email protected]> | 2017-07-19 05:55:47 -0400 | 
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2017-07-26 08:24:22 -0400 | 
| commit | 7b065c554ca55fbc96eced98c7cec0f442ab018a (patch) | |
| tree | 2e7bddd3b3c1e5ecb12a893145a4ebd80e3baa87 /tools/perf/scripts/python/call-graph-from-sql.py | |
| parent | b25db383928cecba356835583b16fa7008f97b3a (diff) | |
media: atomisp2: Array underflow in atomisp_enum_input()
The problem here is this code from atomisp_enum_input():
   581          int index = input->index;
   582
   583          if (index >= isp->input_cnt)
   584                  return -EINVAL;
   585
   586          if (!isp->inputs[index].camera)
   587                  return -EINVAL;
"input->index" is a u32 which comes from the ioctl.  We want negative
values of "index" to be counted as -EINVAL but they aren't.  I've fixed
this by changing the type of "isp->input_cnt" to unsigned int.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions