mirror of
https://github.com/taglib/taglib.git
synced 2025-07-19 05:24:25 -04:00
Accept WAV files with garbage appended (#973)
This will allow editing the tags of WAV files which have data appended at the end. The corresponding unit test checks that the original contents are still available after editing the metadata of such files.
This commit is contained in:
@ -302,13 +302,11 @@ void RIFF::File::read()
|
||||
|
||||
if(!isValidChunkName(chunkName)) {
|
||||
debug("RIFF::File::read() -- Chunk '" + chunkName + "' has invalid ID");
|
||||
setValid(false);
|
||||
break;
|
||||
}
|
||||
|
||||
if(static_cast<long long>(offset) + 8 + chunkSize > length()) {
|
||||
debug("RIFF::File::read() -- Chunk '" + chunkName + "' has invalid size (larger than the file size)");
|
||||
setValid(false);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user