diracdec: check that block length is valid
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Wed, 6 May 2015 13:34:53 +0000 (15:34 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 6 May 2015 16:02:35 +0000 (18:02 +0200)
commit75fc81c8318505aa7946e05a9bee08d47241fc66
treed914b275b2ea900af96074496594970f9c133659
parent4b13a542a27d41dedd130fd57cd018c3bb9b54b5
diracdec: check that block length is valid

In init_planes p->xblen and p->yblen are set to:
            p->xblen = s->plane[0].xblen >> s->chroma_x_shift;
            p->yblen = s->plane[0].yblen >> s->chroma_y_shift;

These are later used as block_w and block_h arguments of
s->vdsp.emulated_edge_mc. If one of them is 0 it triggers an av_assert2
in emulated_edge_mc:
    av_assert2(start_x < end_x && block_w > 0);
    av_assert2(start_y < end_y && block_h > 0);

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/diracdec.c