From: Markus Pargmann Date: Fri, 23 Jan 2015 16:51:25 +0000 (-0300) Subject: [media] coda: fix width validity check when starting to decode X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=31db5adb4ea78976c5e1c2c7aa386e494872e8c1;p=openwrt%2Fstaging%2Fblogic.git [media] coda: fix width validity check when starting to decode Compare rounded up width to fit into bytesperline. Signed-off-by: Markus Pargmann Signed-off-by: Philipp Zabel Signed-off-by: Kamil Debski Signed-off-by: Mauro Carvalho Chehab --- 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; }