summaryrefslogtreecommitdiff
path: root/libavcodec/wmadec.c
diff options
context:
space:
mode:
authorZdenek Kabelac <kabi@informatics.muni.cz>2002-10-31 20:22:30 +0000
committerZdenek Kabelac <kabi@informatics.muni.cz>2002-10-31 20:22:30 +0000
commitf408fc67c0bcd735ee2638d78cc4dcc3590bbb5b (patch)
tree246c35f0e75a7aa81ddf4a4c2b4984202bb465de /libavcodec/wmadec.c
parentdd3be2c97e60409a85a396bfb34d4514de33f498 (diff)
* avoid negative numbers as well
Originally committed as revision 1134 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/wmadec.c')
-rw-r--r--libavcodec/wmadec.c2
1 files changed, 1 insertions, 1 deletions
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;