You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-16 22:42:38 +02:00
handle invalid buffer sizes
Originally committed as revision 2734 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -900,6 +900,11 @@ static int ipvideo_decode_frame(AVCodecContext *avctx,
|
|||||||
IpvideoContext *s = avctx->priv_data;
|
IpvideoContext *s = avctx->priv_data;
|
||||||
AVPaletteControl *palette_control = avctx->palctrl;
|
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->decoding_map = buf;
|
||||||
s->buf = buf + s->decoding_map_size;
|
s->buf = buf + s->decoding_map_size;
|
||||||
s->size = buf_size - s->decoding_map_size;
|
s->size = buf_size - s->decoding_map_size;
|
||||||
|
Reference in New Issue
Block a user