The mvcol buffer is allocated at the end of the first internal buffer.
This patch fixes an out of bounds array access.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
        /* mvcol buffer for mpeg4 */
        if ((dev->devtype->product != CODA_DX6) &&
            (ctx->codec->src_fourcc == V4L2_PIX_FMT_MPEG4))
-               coda_parabuf_write(ctx, 97, ctx->internal_frames[i].paddr +
+               coda_parabuf_write(ctx, 97, ctx->internal_frames[0].paddr +
                                            ysize + ysize/4 + ysize/4);
 
        return 0;