diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-03-18 02:29:58 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-03-18 02:29:58 +0000 |
commit | e70e7a4b172dcadaf6a25a6a37dedcf2e39c06ec (patch) | |
tree | c3026195f162ceeaa7ee3d45c73dcf63fa480819 /libavcodec/huffyuv.c | |
parent | b0e6636b2d5f840f7fd1497c0d5d65b32e6dbf4c (diff) | |
download | ffmpeg-e70e7a4b172dcadaf6a25a6a37dedcf2e39c06ec.tar.gz |
segfault fix
Originally committed as revision 5178 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/huffyuv.c')
-rw-r--r-- | libavcodec/huffyuv.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c index dd5e8bee68..39b0534a00 100644 --- a/libavcodec/huffyuv.c +++ b/libavcodec/huffyuv.c @@ -808,6 +808,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8 return -1; } + if((unsigned)(buf_size-table_size) >= INT_MAX/8) + return -1; + init_get_bits(&s->gb, s->bitstream_buffer+table_size, (buf_size-table_size)*8); fake_ystride= s->interlaced ? p->linesize[0]*2 : p->linesize[0]; |