mirror of
https://github.com/RPCS3/soundtouch.git
synced 2024-11-23 19:39:47 +00:00
Improved WavFile header/fact not-too-small check
This commit is contained in:
parent
e024068905
commit
46531e5b92
@ -522,7 +522,7 @@ int WavInFile::readHeaderBlock()
|
||||
nDump = nLen - ((int)sizeof(header.format) - 8);
|
||||
|
||||
// verify that header length isn't smaller than expected structure
|
||||
if (nDump < 0) return -1;
|
||||
if ((nLen < 0) || (nDump < 0)) return -1;
|
||||
|
||||
header.format.format_len = nLen;
|
||||
|
||||
@ -567,7 +567,7 @@ int WavInFile::readHeaderBlock()
|
||||
nDump = nLen - ((int)sizeof(header.fact) - 8);
|
||||
|
||||
// verify that fact length isn't smaller than expected structure
|
||||
if (nDump < 0) return -1;
|
||||
if ((nLen < 0) || (nDump < 0)) return -1;
|
||||
|
||||
header.fact.fact_len = nLen;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user