mirror of
https://github.com/taglib/taglib.git
synced 2026-05-28 09:59:18 -04:00
Protect against incorrect ID3v2 version parameter
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user