mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
MPC: Fix heap-buffer-overflow in readSV7()
If `data` is an allocation of only 3 bytes (MP+) then `data[3]` is a read past the end of the buffer.
This commit is contained in:
parent
5f6bbb20e7
commit
f2eb331696
@ -298,6 +298,9 @@ void MPC::Properties::readSV8(File *file, long streamLength)
|
||||
void MPC::Properties::readSV7(const ByteVector &data, long streamLength)
|
||||
{
|
||||
if(data.startsWith("MP+")) {
|
||||
if(data.size() < 4)
|
||||
return;
|
||||
|
||||
d->version = data[3] & 15;
|
||||
if(d->version < 7)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user