+++ This bug was initially created as a clone of Bug #175781 +++ If the last chunk has an odd size, id3 chunk will be written at odd position. - take the attached sample - tag it - look where the chunk starts That will corrupt the file. patch attached (on base of svn://anonsvn.kde.org/home/kde/tags/taglib/1.6.3)
Created attachment 48691 [details] aiff file with odd chunk size
Created attachment 48692 [details] patch file based on svn://anonsvn.kde.org/home/kde/tags/taglib/1.6.3
Jens, thanks so much for the patch, you are definitely right, it is a bug and should be fixed in taglib!
is there a reason this patch is not applied yet in trunk?
SVN commit 1220223 by lalinsky: Fix writing of new RIFF chunks at even positions If the last chunk had an odd size, the new chunk would have been written at odd position, which is incorrect. This is based on the patch by Jens Dyffort, but I ended up changing the implementation to correctly handle subsequential updates to the file. The whole RIFF code really needs to be rewritten in a different way... BUG:243954 M +42 -13 taglib/riff/rifffile.cpp M +12 -1 taglib/riff/rifffile.h AM tests/data/noise.aif AM tests/data/noise_odd.aif M +116 -0 tests/test_riff.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1220223