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

Jindrich Makovicka makovick at kmlinux.fjfi.cvut.cz
Sun Mar 12 19:38:46 CET 2006


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.

-- 
Jindrich Makovicka




More information about the MPlayer-dev-eng mailing list