OSDN Git Service

[media] cec-funcs.h: add length checks
authorHans Verkuil <hansverk@cisco.com>
Wed, 6 Jul 2016 08:49:26 +0000 (05:49 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 8 Jul 2016 21:34:42 +0000 (18:34 -0300)
commit0cb1f1e44cf5b013dd0991f509e332ac77ce2ddd
tree08356944be5b10d11a30eae971ae365bdba79c57
parent5bb2399a4fe4a1703c1497b4838c5e8e869d0822
[media] cec-funcs.h: add length checks

Add msg->len sanity checks to fix static checker warning:

include/linux/cec-funcs.h:1154 cec_ops_set_osd_string()
warn: setting length 'msg->len - 3' to negative one

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
include/linux/cec-funcs.h