Fixed detecting RIFF files with invalid chunk sizes

This commit is contained in:
Tsuda Kageyu 2013-10-07 17:00:58 +09:00
parent 95776b5905
commit 079e3e0b87

View File

@ -273,7 +273,7 @@ void RIFF::File::read()
break;
}
if(tell() + chunkSize > uint(length())) {
if(static_cast<ulonglong>(tell()) + chunkSize > static_cast<ulonglong>(length())) {
debug("RIFF::File::read() -- Chunk '" + chunkName + "' has invalid size (larger than the file size)");
setValid(false);
break;