diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2015-01-23 13:51:25 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-02 10:24:57 -0200 |
commit | 31db5adb4ea78976c5e1c2c7aa386e494872e8c1 (patch) | |
tree | b3c059589769d9c4f091dded8c151dd431471333 /drivers/media | |
parent | 8c9ef6b16c433fd4850ef8f9dd74af36232ed055 (diff) | |
download | linux-31db5adb4ea78976c5e1c2c7aa386e494872e8c1.tar.gz linux-31db5adb4ea78976c5e1c2c7aa386e494872e8c1.tar.bz2 linux-31db5adb4ea78976c5e1c2c7aa386e494872e8c1.zip |
[media] coda: fix width validity check when starting to decode
Compare rounded up width to fit into bytesperline.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/coda/coda-bit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c index d81635d272de..6ecfd29b7d98 100644 --- a/drivers/media/platform/coda/coda-bit.c +++ b/drivers/media/platform/coda/coda-bit.c @@ -1431,9 +1431,10 @@ static int __coda_start_decoding(struct coda_ctx *ctx) height = val & CODA7_PICHEIGHT_MASK; } - if (width > q_data_dst->width || height > q_data_dst->height) { + if (width > q_data_dst->bytesperline || height > q_data_dst->height) { v4l2_err(&dev->v4l2_dev, "stream is %dx%d, not %dx%d\n", - width, height, q_data_dst->width, q_data_dst->height); + width, height, q_data_dst->bytesperline, + q_data_dst->height); return -EINVAL; } |