]> git.baikalelectronics.ru Git - kernel.git/commit
[media] cec: fix off-by-one memset
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 22 Jul 2016 08:36:29 +0000 (05:36 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 28 Jul 2016 23:16:35 +0000 (20:16 -0300)
commitaa0371ccf2e495c8e59e5167eea2e574530a50bd
tree2f15beb3e5ff2268fda5c96b62916a2d3ee6701e
parente6a47db34f699f44fca2d2a0935c8326aed12d6f
[media] cec: fix off-by-one memset

The unused bytes of the features array should be zeroed, but the start index was one
byte too early. This caused the device features byte to be overwritten by 0.

The compliance test for the CEC_S_LOG_ADDRS ioctl didn't catch this because it tested
byte continuation with the second device features byte being 0 :-(

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/cec/cec-adap.c