mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-06 00:13:38 -04:00
media: rc: validate that "rc_proto" is reasonable
Smatch complains that "rc_proto" comes from the user and it can result in shift wrapping in ir_raw_encode_scancode() drivers/media/rc/rc-ir-raw.c:526 ir_raw_encode_scancode() error: undefined (user controlled) shift '1 << protocol' This is true, but I reviewed the surrounding code and it appears harmless. Anyway, let's verify that "rc_proto" is valid as a kernel hardening measure. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
7399139be6
commit
72e637fec5
2 changed files with 3 additions and 1 deletions
|
@ -226,6 +226,7 @@ enum rc_proto {
|
|||
RC_PROTO_RCMM24 = 25,
|
||||
RC_PROTO_RCMM32 = 26,
|
||||
RC_PROTO_XBOX_DVD = 27,
|
||||
RC_PROTO_MAX = RC_PROTO_XBOX_DVD,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue