aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorChangming Liu <[email protected]>2020-03-10 22:13:20 +0100
committerMauro Carvalho Chehab <[email protected]>2020-03-12 16:26:15 +0100
commit3f870a450304427892cefbec7fbc76a553586278 (patch)
tree7af3965b1af3964fb283986d0aac1c4f87a6d4a5 /tools/perf/scripts/python/bin
parent80264809ea0a3fd2ee8251f31a9eb85d2c3fc77e (diff)
media: am437x-vpfe: exclude illegal values for enum when validing params from user space
When calling ccdc_data_size_max_bit() to validate data_sz in vpfe_ccdc_validate_param(), it's treated as an enumeration ranging from 0 to 7 while essentially it's an 32 bit unsigned integer directly from user space. This can make the return value of ccdc_data_size_max_bit() underflow and bypass the following check. To fix this, an additional check is added to the following if clause to keep this enumaration variable in range. And if its value is not legal, return -EINVAL properly. Signed-off-by: Changming Liu <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions