[Vorbis-dev] Crash when reading OGG/Vorbis file

Michael Smith msmith at xiph.org
Sun Dec 19 20:52:49 PST 2004


On Monday 20 December 2004 11:49, Stevo Brock wrote:
> Hi Mike,
>
> Thanks for the reply.
>
> Since posting the message, I did upgrade to OGG 1.1.2 and Vorbis 1.1.0
> and thankfully now there is no crash.  Now at the point in reading the
> file where the crash used to happen, file reading just stops.
>
> I also, rather painfully, compiled ogginfo (I'm on MacOS X), and ran
> the file through it.  ogginfo prints out lots of errors for this file
> so I think it's pretty safe to say the file is quite corrupted.

Ok, that's pretty much what I expected. Good news that it's fixed by version 
1.1, though!

Did you need to make any actual source changes to ogginfo to get it working on 
OS X, or was it just painful setting up the build stuff? If you did, I'd 
welcome a patch so that other people don't need to do it later. 

>
> I haven't looked, but is there any kind of validation function that an
> app can use to test a file before trying to process it.  Kind of like
> an ogginfo with a return status?

Not that I know of, though you could build one out of the guts of ogginfo if 
you wanted, which shouldn't be too hard. 

The problem, of course, is that when doing that, you can't make any 
assumptions about the structure of the data that you would usually make to 
make something like that run fast - you end up having to sequentially read 
the entire file, checking everything.

Also, there are lots of errors that ogginfo (and similar tools) will warn you 
about, but which aren't serious enough to cause vorbisfile (and most other 
decoders that don't use vorbisfile) to break. So you don't neccesarily want 
an all-or-nothing function like that.

Mike



More information about the Vorbis-dev mailing list