Browse Source

Limit fsize before adding to pointer.

This avoids a theoretically possible pointer arithmetic overflow
which would lead to a crash due to reading from NULL page.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
tags/n0.9
Reimar Döffinger 14 years ago
parent
commit
b39f872a41
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavformat/aacdec.c

+ 1
- 0
libavformat/aacdec.c View File

@@ -47,6 +47,7 @@ static int adts_aac_probe(AVProbeData *p)
fsize = (AV_RB32(buf2 + 3) >> 13) & 0x1FFF;
if(fsize < 7)
break;
fsize = FFMIN(fsize, end - buf2);
buf2 += fsize;
}
max_frames = FFMAX(max_frames, frames);


Loading…
Cancel
Save