Browse Source

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
tags/v0.5
Matti Hamalainen Michael Niedermayer 20 years ago
parent
commit
aabdc46187
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/idcinvideo.c

+ 1
- 1
libavcodec/idcinvideo.c View File

@@ -192,7 +192,7 @@ static void idcin_decode_vlcs(IdcinContext *s)


while(node_num >= HUF_TOKENS) { while(node_num >= HUF_TOKENS) {
if(!bit_pos) { if(!bit_pos) {
if(dat_pos > s->size) {
if(dat_pos >= s->size) {
av_log(s->avctx, AV_LOG_ERROR, "Huffman decode error.\n"); av_log(s->avctx, AV_LOG_ERROR, "Huffman decode error.\n");
return; return;
} }


Loading…
Cancel
Save