mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-15 07:16:13 -04:00
Check for invalid chunk size in WAV64
This commit is contained in:
parent
99adfdbf22
commit
2544195abf
@ -240,7 +240,14 @@ class iff_parser final {
|
||||
}
|
||||
}
|
||||
|
||||
if constexpr (!SizeIncludesHeader) {
|
||||
if constexpr (SizeIncludesHeader) {
|
||||
if (c->header.size < sizeof(ChunkHeaderType)) {
|
||||
LOG_WARN << "[" << name_ << "] " << path_
|
||||
<< ": invalid chunk size: " << c->header.size;
|
||||
c.reset();
|
||||
return c;
|
||||
}
|
||||
} else {
|
||||
pos_ += sizeof(ChunkHeaderType);
|
||||
}
|
||||
|
||||
@ -252,6 +259,7 @@ class iff_parser final {
|
||||
<< ", hdr.size=" << c->header.size << ", end=" << data_.size()
|
||||
<< ")";
|
||||
c.reset();
|
||||
return c;
|
||||
}
|
||||
|
||||
LOG_TRACE << "[" << name_ << "] " << path_ << ": `" << c->fourcc()
|
||||
|
Loading…
x
Reference in New Issue
Block a user