Commit 5bcfbc84 authored by benoit's avatar benoit

Check buffer is inside what is passed when probing for flac.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16825 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 361d7072
......@@ -586,11 +586,12 @@ static int eac3_probe(AVProbeData *p)
static int flac_probe(AVProbeData *p)
{
uint8_t *bufptr = p->buf;
uint8_t *end = p->buf + p->buf_size;
if(ff_id3v2_match(bufptr))
bufptr += ff_id3v2_tag_len(bufptr);
if(memcmp(bufptr, "fLaC", 4)) return 0;
if(bufptr > end-4 || memcmp(bufptr, "fLaC", 4)) return 0;
else return AVPROBE_SCORE_MAX / 2;
}
#endif
......
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