summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/interplayvideo.c5
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;