[F] Editing file increases its size to 1GB

Mp3tag increases some m4a files' size to 1gb during editing.
Sample file attached.


test_mp3tag.zip (161 KB)

foobar2000 reports that the file is corrupt or incomplete.
So I would check the files for integrity first.
Also, please note that nero tags are not supported by MP3tag.

But foobar2000 (and other music related applications on my pc) can play it and read its tag.
Let's assume that the file is corrupted. Then why does mp3tag save changes successfully and increase the file size instead of showing an error message?

I am not sure that I understand what you are getting at.
Do you want better error messages?
MP3tag does not check the plausibility of the header information.
Broken VBR headers do not get corrected and lead to strange lengths and data rates.
Corrupt M4a files may lead to files with the size of 1GB.
As soon as this (audio) data is fixed, you do not get any hicups.
It is just a demonstration of the GIGO principle.

If increasing the file size 6261272.307929181-fold is not a bug, then i have a feature request.
Mp3tag should stop or warn the user if the new file size exceeds for example 200% of initial file size.

MP3tag follows that what has been written in the header of the file. The header also tells how many
And apparently you have stored utter garbage there.
Again: what happens if you repair the file?
Does MP3tag increase the file size in the way you described it? If that is the case, then you probably have a bug.

The 200% increase can easily be achieved if you add a big cover to a very short audio part. No bug there.

1by1 player is the application that has stored some data which you refer to as "utter garbage" in the file.

When data added by 1by1 is removed, of course everything is fine. Mp3tag can edit it without increasing the size. But the problem is that i want that data there.

Windows explorer can edit the "garbage"d file and the size doesn't change. This is what makes me claim that Mp3tag has a bug. I can use windows but it won't be as fast and powerful as Mp3tag.

I considered it when i wrote, that's why i said "for example". Don't tell me that developers do what a user "exactly" says when they're adding a feature. There you go:
Abort if (new file size - input size)>(initial size X 2)

Hello anil,

many thanks for your bug report which I can reproduce here. I consider not raising an error message in case malformed data is provided and instead increasing the file size by that extend to be a serious issue and a loop-hole for possible exploits.

I'll analyze the issue and will fix it to the next release.

Kind regards
– Florian

This is now fixed with Mp3tag v2.82.

The test file you've provided was tagged with an APEv2 and an ID3v1 tag, which are both tag formats not suitable (and not standardized) for MP4 files. Whatever program you've used to add those tags, I'd recommend to not continue using for that task.

Kind regards
– Florian

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.