avcodec/mlpdec: Fail if the input is too small
This fixes a infinite loop Fixes Ticket2986 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
9790a03e67
commit
f7bea731d9
@ -1070,7 +1070,7 @@ static int read_access_unit(AVCodecContext *avctx, void* data,
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (buf_size < 4)
|
if (buf_size < 4)
|
||||||
return 0;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
length = (AV_RB16(buf) & 0xfff) * 2;
|
length = (AV_RB16(buf) & 0xfff) * 2;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user