[FFmpeg-cvslog] avcodec/mlpdec: Fail if the input is too small

Michael Niedermayer git at videolan.org
Fri Sep 27 20:25:36 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Sep 27 20:12:37 2013 +0200| [f7bea731d955ec25a726abcd31862d3bd0183d58] | committer: Michael Niedermayer

avcodec/mlpdec: Fail if the input is too small

This fixes a infinite loop
Fixes Ticket2986

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f7bea731d955ec25a726abcd31862d3bd0183d58
---

 libavcodec/mlpdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 059e4d0..961ed62 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -1070,7 +1070,7 @@ static int read_access_unit(AVCodecContext *avctx, void* data,
     int ret;
 
     if (buf_size < 4)
-        return 0;
+        return AVERROR_INVALIDDATA;
 
     length = (AV_RB16(buf) & 0xfff) * 2;
 



More information about the ffmpeg-cvslog mailing list