From f408fc67c0bcd735ee2638d78cc4dcc3590bbb5b Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 31 Oct 2002 20:22:30 +0000 Subject: [PATCH] * avoid negative numbers as well Originally committed as revision 1134 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/wmadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index 4fbbe39a4b..7505a9be3d 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -1282,7 +1282,7 @@ static int wma_decode_superframe(AVCodecContext *avctx, s->last_bitoffset = pos & 7; pos >>= 3; len = buf_size - pos; - if (len > MAX_CODED_SUPERFRAME_SIZE) { + if (len > MAX_CODED_SUPERFRAME_SIZE || len < 0) { return -1; } s->last_superframe_len = len;