]> asedeno.scripts.mit.edu Git - linux.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)
commit076673419741c1c769f59536c199234937df1762
treed5439b1f3ebc2b257585d94b55fb2b435b2ffdc5
parent764dfee1a153eebf43bdb4eee94ef7e156ff5f5f
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