Commit f7bea731 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mlpdec: Fail if the input is too small

This fixes a infinite loop
Fixes Ticket2986
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 9790a03e
...@@ -1070,7 +1070,7 @@ static int read_access_unit(AVCodecContext *avctx, void* data, ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment