Protect against incorrect ID3v2 version parameter

This commit is contained in:
Lukáš Lalinský
2011-04-05 15:36:23 +02:00
parent aa57db3a39
commit 3715b96477
2 changed files with 25 additions and 0 deletions

View File

@@ -438,6 +438,11 @@ ByteVector ID3v2::Tag::render(int version) const
ByteVector tagData;
if(version != 3 && version != 4) {
debug("Unknown ID3v2 version, using ID3v2.4");
version = 4;
}
// TODO: Render the extended header.
// Loop through the frames rendering them and adding them to the tagData.