]> git.baikalelectronics.ru Git - kernel.git/commit
media: vicodec: fix out-of-range values when decoding
authorHans Verkuil <hverkuil@xs4all.nl>
Thu, 23 Aug 2018 08:10:05 +0000 (04:10 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 31 Aug 2018 12:30:46 +0000 (08:30 -0400)
commit8b65345c85badae6cc9b333b7f3e135ee9abc8cc
treed7a3a184ca868cb17c8abb8097f840ff11ef317d
parent9dab089d1bdc62e451b26a472c343a42f2037735
media: vicodec: fix out-of-range values when decoding

While decoding you need to make sure you do not get values < 0
or > 255. Note that since this code will also be used in userspace
utilities the clamp macro isn't used since that is kernel-only.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vicodec/codec-fwht.c