提交 31db5adb 编写于 作者: M Markus Pargmann 提交者: Mauro Carvalho Chehab

[media] coda: fix width validity check when starting to decode

Compare rounded up width to fit into bytesperline.
Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: NKamil Debski <k.debski@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 8c9ef6b1
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册