summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2015-01-23 13:51:25 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-02-02 10:24:57 -0200
commit31db5adb4ea78976c5e1c2c7aa386e494872e8c1 (patch)
treeb3c059589769d9c4f091dded8c151dd431471333 /drivers/media/platform
parent8c9ef6b16c433fd4850ef8f9dd74af36232ed055 (diff)
downloadop-kernel-dev-31db5adb4ea78976c5e1c2c7aa386e494872e8c1.zip
op-kernel-dev-31db5adb4ea78976c5e1c2c7aa386e494872e8c1.tar.gz
[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/platform')
-rw-r--r--drivers/media/platform/coda/coda-bit.c5
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 d81635d..6ecfd29 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;
}
OpenPOWER on IntegriCloud