Browse Source

avidec: Check that the header chunks fit in the available filesize.

Fixes Ticket771
Bug found by: Diana Elena Muscalu

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 62adc60b97)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.9.1
Michael Niedermayer 14 years ago
parent
commit
c40296d1ad
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavformat/avidec.c

+ 5
- 0
libavformat/avidec.c View File

@@ -387,6 +387,11 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
tag = avio_rl32(pb);
size = avio_rl32(pb);

if(size > avi->fsize){
av_log(s, AV_LOG_ERROR, "chunk size is too big during header parsing\n");
goto fail;
}

print_tag("tag", tag, size);

switch(tag) {


Loading…
Cancel
Save