1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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
This commit is contained in:
Matti Hamalainen 2005-02-16 22:42:41 +00:00 committed by Michael Niedermayer
parent d2a7718df9
commit aabdc46187

View File

@ -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;
}