]> git.baikalelectronics.ru Git - kernel.git/commit
media: vsp1: Protect bodies against overflow
authorKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Fri, 18 May 2018 20:41:57 +0000 (16:41 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 25 May 2018 22:40:19 +0000 (18:40 -0400)
commitebed371ad865558ee4a19e0bc53e8ed1c01e0fe7
treed5439b1f3ebc2b257585d94b55fb2b435b2ffdc5
parentda842cd7b9dde0dbfe81c9685fc3f71e5d1108a4
media: vsp1: Protect bodies against overflow

The body write function relies on the code never asking it to write more
than the entries available in the list.

Currently with each list body containing 256 entries, this is fine, but
we can reduce this number greatly saving memory. In preparation of this
add a level of protection to catch any buffer overflows.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vsp1/vsp1_dl.c