[ogg-dev] Fixing ogg vorbis corruption caused by bad metadata

Erik de Castro Lopo mle+la at mega-nerd.com
Tue Jul 21 15:27:23 PDT 2009


Adam Rosi-Kessel wrote:

> I finally got something like an explanation from the Mediamonkey 
> developers. Here is their explanation as to why MM corrupted my files:
> 
>  > the problem was caused by the fact that Vorbis library uses alloca()
>  > function on several places, which allocates memory on stack. We
>  > changed it to alloc() and free() functions pair instead, which fixes
>  > the problem. I suppose that it can easily happen to any other
>  > application using Vorbis library, but the real problem depends on
>  > stack settings of the particular application. In any case, I think it
>  > might make sense for Vorbis developers to make this change.
> 
> I'm not sure exactly what to make of this, but it sounds perhaps like a 
> stack overflow issue?

On some platforms (I think windows is one) the alloc() implemetation
is buggy. Those kinds of bugs can cause all sorts of problems.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the ogg-dev mailing list