mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Validate the tag's version of file length against the actual length
This commit is contained in:
parent
ebaecc47f4
commit
caf705958e
@ -168,6 +168,14 @@ void DSF::File::read(bool readProperties, AudioProperties::ReadStyle propertiesS
|
||||
}
|
||||
|
||||
d->fileSize = readBlock(8).toInt64LE(0);
|
||||
|
||||
// File is malformed or corrupted
|
||||
if(d->fileSize != length()) {
|
||||
debug("DSF::File::read() -- File is corrupted.");
|
||||
setValid(false);
|
||||
return;
|
||||
}
|
||||
|
||||
d->metadataOffset = readBlock(8).toInt64LE(0);
|
||||
|
||||
// File is malformed or corrupted
|
||||
|
Loading…
x
Reference in New Issue
Block a user