[FFmpeg-devel] [PATCH] IFF demuxer and 8SVX decoder

Michael Niedermayer michaelni
Thu Mar 27 21:44:16 CET 2008


On Thu, Mar 27, 2008 at 01:19:24PM -0700, Mike Melanson wrote:
> Michael Niedermayer wrote:
> >> +static int iff_probe(AVProbeData *p)
> >> +{
> >> +    const uint8_t *d = p->buf;
> >> +
> >> +    if (AV_RL32(d) == ID_FORM)
> >> +        return AVPROBE_SCORE_MAX;
> >> +    return 0;
> >> +}
> > 
> > this is insufficient, it also applies to wc3 files
> > see libavformat/wc3movie.c
> 
> I know; I'm a bad influence and set a bad example. :) But wc3movie.c
> actually checks for a total of 8 magic bytes, not just 4.
> 
> And yeah, checking for 'FORM' is bad form (heh) since so many formats
> used that. Bytes 8-11 carried the sub-type.
> 
> In light of the recent FLIC problem, should we start requiring even more
> sanity checks from our demuxers?

If an additional 32bit check is just a line more its definitly a good idea

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I count him braver who overcomes his desires than him who conquers his
enemies for the hardest victory is over self. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080327/e8feaae6/attachment.pgp>



More information about the ffmpeg-devel mailing list