Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3cc26912 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[media] ttusb_dec: avoid the risk of go past buffer



Fixes this smatch warning:
	drivers/media/usb/ttusb-dec/ttusb_dec.c:243 ttusb_dec_handle_irq() error: buffer overflow 'rc_keys' 26 <= 126

As the RC keys should be enabled previously, via:
	set_bit(rc_keys[i], input_dev->keybit);

It wouldn't go past the buffer in practice. Yet, as bad
things may happen when going past buffer, it doesn't hurt adding
a check here.

While here, fix CodingStyle issues on the routine.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent e837d85c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment