mirror of
https://github.com/taglib/taglib.git
synced 2025-06-03 09:08:09 -04:00
ASF: Bounds check the size of each header object
UBSan spotted an integer overflow on the line `dataPos += size`, so add a bounds check to the size that we read.
This commit is contained in:
parent
51ae5748cb
commit
d74689cb93
@ -384,7 +384,7 @@ void ASF::File::FilePrivate::HeaderExtensionObject::parse(ASF::File *file, unsig
|
||||
}
|
||||
bool ok;
|
||||
long long size = readQWORD(file, &ok);
|
||||
if(!ok) {
|
||||
if(!ok || size < 0 || size > dataSize - dataPos) {
|
||||
file->setValid(false);
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user