Commit b86e156f authored by michael's avatar michael

Make flic probe check a few more things.

fixes issue399


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14235 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 494b4e12
...@@ -54,12 +54,25 @@ static int flic_probe(AVProbeData *p) ...@@ -54,12 +54,25 @@ static int flic_probe(AVProbeData *p)
{ {
int magic_number; int magic_number;
if(p->buf_size < FLIC_HEADER_SIZE)
return 0;
magic_number = AV_RL16(&p->buf[4]); magic_number = AV_RL16(&p->buf[4]);
if ((magic_number != FLIC_FILE_MAGIC_1) && if ((magic_number != FLIC_FILE_MAGIC_1) &&
(magic_number != FLIC_FILE_MAGIC_2) && (magic_number != FLIC_FILE_MAGIC_2) &&
(magic_number != FLIC_FILE_MAGIC_3)) (magic_number != FLIC_FILE_MAGIC_3))
return 0; return 0;
if(AV_RL16(&p->buf[0x10]) != FLIC_CHUNK_MAGIC_1){
if(AV_RL32(&p->buf[0x10]) > 2000)
return 0;
}
if( AV_RL16(&p->buf[0x08]) > 4096
|| AV_RL16(&p->buf[0x0A]) > 4096)
return 0;
return AVPROBE_SCORE_MAX; return AVPROBE_SCORE_MAX;
} }
......
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