writeTag can clobber MP3 stream due to bad padding calculation
Bug #1511848 reported by
Bart Massey
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
idiii |
In Progress
|
Critical
|
Bart Massey |
Bug Description
From: Roman Cheplyaka <email address hidden>
Consider the 'else' code path in hWriteTag: when the new tag is smaller
than the old tag. The padding is correctly updated to account for the
difference, but that does not seem to translate into an updated header
size. Thus the declared header size (which comes form the new, small
tag) is smaller than the actual size.
To post a comment you must log in.
I am having a hard time verifying the bug, but have rewritten a bunch of WriteTag.hs to make it more transparent, which may help. I am now working on adding custom padding size support to WriteTag.hs. When I have this right, I will add some tests to the test suite to check all the cases of padding. Apologies if this takes a while. If you have a good test case, please do send it to me.