mirror of
https://github.com/taglib/taglib.git
synced 2026-10-09 09:42:03 -04:00
RIFF: Do not create INFO fields from a truncated chunk header (#1454)
This commit is contained in:
@@ -314,7 +314,8 @@ void RIFF::Info::Tag::setStringHandler(const StringHandler *handler)
|
||||
void RIFF::Info::Tag::parse(const ByteVector &data)
|
||||
{
|
||||
unsigned int p = 4;
|
||||
while(p < data.size()) {
|
||||
// Needs a full 8-byte header; fewer bytes left would wrap the check below.
|
||||
while(p + 8 <= data.size()) {
|
||||
const unsigned int size = data.toUInt(p + 4, false);
|
||||
if(size > data.size() - p - 8)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user