diff options
| author | Dan Carpenter <[email protected]> | 2020-05-05 10:25:56 +0200 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2020-05-05 17:27:03 +0200 |
| commit | 3b5af3171e2d5a73ae6f04965ed653d039904eb6 (patch) | |
| tree | 40ecc19c0e87ea2777814bea7c3aaea7ac4b1c54 /tools/perf/scripts/python | |
| parent | 62eedb356188376acd0368384a9b294d5180c00b (diff) | |
media: cec: silence shift wrapping warning in __cec_s_log_addrs()
The log_addrs->log_addr_type[i] value is a u8 which is controlled by
the user and comes from the ioctl. If it's over 31 then that results in
undefined behavior (shift wrapping) and that leads to a Smatch static
checker warning. We already cap the value later so we can silence the
warning just by re-ordering the existing checks.
I think the UBSan checker will also catch this bug at runtime and
generate a warning. But otherwise the bug is harmless.
Fixes: 9881fe0ca187 ("[media] cec: add HDMI CEC framework (adapter)")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions