RIFF: Do not create INFO fields from a truncated chunk header (#1454)

This commit is contained in:
MinnieTheMoocher
2026-09-27 16:56:14 +02:00
committed by GitHub
parent 8503099543
commit f9efbc7ba8
+2 -1
View File
@@ -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;