[MPlayer-dev-eng] [PATCH] Metadata retrieval from FLAc audio files.

Benjamin Zores ben at geexbox.org
Sat Mar 18 14:54:23 CET 2006


On Sun, 12 Mar 2006 14:48:41 -0500
Rich Felker <dalias at aerifal.cx> wrote:

> On Sun, Mar 12, 2006 at 07:38:46PM +0100, Jindrich Makovicka wrote:
> > Benjamin Zores wrote:
> > > +    blk_len = (preamble[1] << 16) | (preamble[2] << 8) | (preamble[3] << 0);
> > 
> > [...]
> > 
> > > +    case FLAC_VORBIS_COMMENT:
> > > +    {
> > > +      /* For a description of the format please have a look at */
> > > +      /* http://www.xiph.org/vorbis/doc/v-comment.html */
> > > +
> > > +      uint32_t length, comment_list_len;
> > > +      char comments[blk_len];
> > 
> > This is a c99-ism. Better use either malloc() or constant size & sanity
> > check on blk_len.
> 
> No, allocation on the stack is good. gcc has supported it ever since
> ages ago (gcc 2.7 iirc -- way before it was part of c99), as does
> every known compiler that could possibly hope to compile MPlayer.

so commit it if it do no more shows any issue.

Ben


-- 
"My life, and by extension everyone else's is meaningless."
Bender, Futurama




More information about the MPlayer-dev-eng mailing list