diff options
author | Mike Melanson <mike@multimedia.cx> | 2004-01-31 18:17:38 +0000 |
---|---|---|
committer | Mike Melanson <mike@multimedia.cx> | 2004-01-31 18:17:38 +0000 |
commit | 18a508c52771b52ac3a042fd59a95a7e97fac9ae (patch) | |
tree | 5a2bab1511935bfb7ecd5265685a224d592846c8 | |
parent | 155aa4174d3ed09b23012f6d6caf3509a93f485b (diff) | |
download | ffmpeg-18a508c52771b52ac3a042fd59a95a7e97fac9ae.tar.gz |
handle invalid buffer sizes
Originally committed as revision 2734 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/interplayvideo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c index f354b734c3..06816ba3e9 100644 --- a/libavcodec/interplayvideo.c +++ b/libavcodec/interplayvideo.c @@ -900,6 +900,11 @@ static int ipvideo_decode_frame(AVCodecContext *avctx, IpvideoContext *s = avctx->priv_data; AVPaletteControl *palette_control = avctx->palctrl; + /* compressed buffer needs to be large enough to at least hold an entire + * decoding map */ + if (buf_size < s->decoding_map_size) + return buf_size; + s->decoding_map = buf; s->buf = buf + s->decoding_map_size; s->size = buf_size - s->decoding_map_size; |