]> granicus.if.org Git - taglib/commitdiff
Fixed detecting RIFF files with invalid chunk sizes
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Mon, 7 Oct 2013 08:00:58 +0000 (17:00 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Mon, 7 Oct 2013 08:04:55 +0000 (17:04 +0900)
taglib/riff/rifffile.cpp

index a79a4c7074d54fccfeb623d664e8ee0739607d7b..a39fce614384b8a0ebe1d4748b280e78b3f66c68 100644 (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;