Commit aabdc461 authored by Matti Hamalainen's avatar Matti Hamalainen Committed by Michael Niedermayer

Off-by-one bug in libavcodec/idcinvideo.c, caused

segfaults on all .cin videos from Quake II.
patch by (Matti Hamalainen <mhamalai ratol fi>)

Originally committed as revision 3956 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent d2a7718d
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment