Pierre-Yves Thoulon wrote:

> METADATA_BLOCK_HEADER has a 24-bit field to encode the length of
> METADATA_BLOCK_DATA ; hence the limitation (which not only applies
> to METADATA_BLOCK_PICTURE but all metadata blocks.

I see. So it's possible to abuse some other metadata blocks too..
I found the following checks in libFLAC and metaflac sources:

src/libFLAC/metadata_iterators.c, write_metadata_block_header_cb_(...):

     FLAC__ASSERT(block->length < (1u << FLAC__STREAM_METADATA_LENGTH_LEN));



src/libFLAC/stream_encoder_framing.c, FLAC__add_metadata_block(...):

     FLAC__ASSERT(i < (1u << FLAC__STREAM_METADATA_LENGTH_LEN));



src/metaflac/options.c, FLAC__bool parse_add_padding(...):

     return *out < (1u << FLAC__STREAM_METADATA_LENGTH_LEN);

_______________________________________________
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev

Reply via email to