From aabdc4618788a90c4a2b64a569f560d5b7378271 Mon Sep 17 00:00:00 2001 From: Matti Hamalainen <(mhamalai@students.oamk.fi> Date: Wed, 16 Feb 2005 22:42:41 +0000 Subject: [PATCH] Off-by-one bug in libavcodec/idcinvideo.c, caused segfaults on all .cin videos from Quake II. patch by (Matti Hamalainen ) Originally committed as revision 3956 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/idcinvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/idcinvideo.c b/libavcodec/idcinvideo.c index e53246bd17..f5df5a49d9 100644 --- a/libavcodec/idcinvideo.c +++ b/libavcodec/idcinvideo.c @@ -192,7 +192,7 @@ static void idcin_decode_vlcs(IdcinContext *s) while(node_num >= HUF_TOKENS) { if(!bit_pos) { - if(dat_pos > s->size) { + if(dat_pos >= s->size) { av_log(s->avctx, AV_LOG_ERROR, "Huffman decode error.\n"); return; }