Janne Hyvärinen
2014-Sep-26 12:51 UTC
[flac-dev] Patch to improve malformed vorbiscomment handling
Sorry for spamming but in the haste I forgot the stream_decoder part out. On 26.9.2014 15:47, Janne Hyv?rinen wrote:> On 26.9.2014 15:21, Erik de Castro Lopo wrote: >> Janne Hyv?rinen wrote: >> >>> Patch v2, now handles more malformed cases. Original patch was for a >>> file for which I had a sample from a user but this allows handling some >>> manually broken test cases. >> >> Err, I'm getting warning messages on that patch: >> >> CC metadata_iterators.lo >> metadata_iterators.c: In function >> ?read_metadata_block_data_vorbis_comment_cb_?: >> metadata_iterators.c:2238:12: error: comparison between >> ?FLAC__Metadata_SimpleIteratorStatus? and ?enum <anonymous>? >> [-Werror=enum-compare] >> if(status == FLAC__METADATA_CHAIN_STATUS_BAD_METADATA) goto skip; >> ^ >> metadata_iterators.c:2256:13: error: comparison between >> ?FLAC__Metadata_SimpleIteratorStatus? and ?enum <anonymous>? >> [-Werror=enum-compare] >> if(status == FLAC__METADATA_CHAIN_STATUS_BAD_METADATA) { >> ^ >> >> >> >> Erik > > Darn, MSVC didn't warn anything and I didn't realize there are so many > BAD_METADATA statuses. I picked the first one autocomplete offered. > > One thing I don't like is that these don't return any warning messages > to tools. But I didn't see a way for the library to do that. I see > only fatal errors. > > > > _______________________________________________ > flac-dev mailing list > flac-dev at xiph.org > http://lists.xiph.org/mailman/listinfo/flac-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20140926/92f868f2/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: improve_malformed_comment_handling4.zip Type: application/x-zip-compressed Size: 2176 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20140926/92f868f2/attachment.bin
Erik de Castro Lopo
2014-Sep-26 23:31 UTC
[flac-dev] Patch to improve malformed vorbiscomment handling
Janne Hyv?rinen wrote:> Sorry for spamming but in the haste I forgot the stream_decoder part out.Patch applied with some minor tweaks. BTW, do you have any files that contain malformed vorbiscomments? They may be useful for testing purposes. Cheers, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Janne Hyvärinen
2014-Sep-27 07:35 UTC
[flac-dev] Patch to improve malformed vorbiscomment handling
On 27.9.2014 2:31, Erik de Castro Lopo wrote:> BTW, do you have any files that contain malformed vorbiscomments? > > They may be useful for testing purposes.Attached is a zip with three different test cases. The vorbiscomment block in comment_size_mismatch.flac file is direct copy from the file I received from a foobar2000 user. In that larger file it didn't make tools error out but instead they thought they found new metadata blocks with unknown IDs. -------------- next part -------------- A non-text attachment was scrubbed... Name: malformed_comments.zip Type: application/x-zip-compressed Size: 290278 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20140927/f96d27e3/attachment-0001.bin