[Flac-dev] Serious bug in FLAC

Josh Coalson
Fri, 10 Sep 2004 16:45:32 -0000

--- Nick Lamb <njl98r@ecs.soton.ac.uk> wrote:
> In metadata_callback() in encode.c you should not be examining the
> variable encoder_wrapper->use_ogg unless you have compiled in OGG
> support (I have not). So this code block needs to be wrapped up
> something like this...
>
> #ifdef FLAC__HAS_OGG
>         if(encoder_wrapper->use_ogg)
>                 return;
> #endif
>
> Every user who has flac installed but did not configure OGG support
> will have a high (but not 100%) chance of creating flac files with
> no seektable, and no MD5 checksum, and various other things wrong.

this doesn't help you now, but this bug has already been fixed
in CVS:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/flac/flac/src/flac/encode.c.diff?r1=1.67&r2=1.68

> I recommend that in addition to fixing the original bug it is now too
> late to avoid tweaking libFLAC so that ignores bogus seektables, and
> probably someone needs to write a tool that either removes the
> seektable altogether or corrects all the file metadata by scanning
> the file <sigh>

the next release will have seektable manipulation in
metaflac.  having some basic checks in the seektable
reader is a good idea.  in the meantime, if you are so
inclined you can write a littly diddy to write a padding
block on top of the seektable block so seeking won't be
so slow.

Josh


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage