mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 13:10:26 -04:00
Fail MPEG header check when frame length is zero (#1174)
This commit is contained in:
parent
c86a2fce70
commit
b7dc1ab8ac
@ -336,6 +336,11 @@ void MPEG::Header::parse(File *file, offset_t offset, bool checkLength)
|
||||
// consistent. Otherwise, we assume that either or both of the frames are
|
||||
// broken.
|
||||
|
||||
// A frame length of 0 is probably invalid and would pass the test below
|
||||
// because nextData would be the same as data.
|
||||
if(d->frameLength == 0)
|
||||
return;
|
||||
|
||||
file->seek(offset + d->frameLength);
|
||||
const ByteVector nextData = file->readBlock(4);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user