Mercurial > libavcodec.hg
diff interplayvideo.c @ 1770:cd36e37fb879 libavcodec
handle invalid buffer sizes
author | melanson |
---|---|
date | Sat, 31 Jan 2004 18:17:38 +0000 |
parents | 932d306bf1dc |
children | 129236143f2e |
line wrap: on
line diff
--- a/interplayvideo.c Sat Jan 31 17:57:57 2004 +0000 +++ b/interplayvideo.c Sat Jan 31 18:17:38 2004 +0000 @@ -900,6 +900,11 @@ 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;