[media] coda: drop JPEG buffers not framed by SOI and EOI markers
authorPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 8 Oct 2014 16:09:27 +0000 (13:09 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 28 Oct 2014 17:41:07 +0000 (15:41 -0200)
commitedc16cb1159c03864c74fd0411ec5d0bcce845be
tree155809aa32a8723a91928e709f174162ab3f31c9
parentd4bb75f6eee2f9cd7dc0787e3a8fb6bb3e430802
[media] coda: drop JPEG buffers not framed by SOI and EOI markers

This patch adds a quick check for valid JPEG frames before feeding them into
the bitstream buffer: Frames that do not begin with the JPEG start of image
marker and end with the end of image marker are dropped.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/coda/coda-bit.c
drivers/media/platform/coda/coda-jpeg.c
drivers/media/platform/coda/coda.h