Comment 2 for bug 1511848

Revision history for this message
Bart Massey (bart-massey) wrote :

From: Roman Cheplyaka <email address hidden>

Here's a different code path reproducing, I believe, the same bug.

Take an mp3 file without any tag at all (example attached).

Then run this program on it:

module Main where

import ID3
import ID3.Simple
import System.Environment

main :: IO ()
main = do
  [n, path] <- getArgs
  let
    tag = initID3Tag
      [ setTitle (replicate (read n) 'x') ]
  writeTag path tag

Like this:

 cp test0.mp3 test.mp3 && idiii-bug-exe 2 test.mp3

You can then check in a hex editor that the declared header size is 0x0D
(corresponding to the bare tag without padding), while there is a
4096-byte padding present.

As I said, in both cases the issue seems to be that updating the padding
does not affect the declared header size.