From 079e3e0b87911e034ecf1764fe9a5944e51d0cde Mon Sep 17 00:00:00 2001 From: Tsuda Kageyu Date: Mon, 7 Oct 2013 17:00:58 +0900 Subject: [PATCH] Fixed detecting RIFF files with invalid chunk sizes --- taglib/riff/rifffile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taglib/riff/rifffile.cpp b/taglib/riff/rifffile.cpp index a79a4c70..a39fce61 100644 --- a/taglib/riff/rifffile.cpp +++ b/taglib/riff/rifffile.cpp @@ -273,7 +273,7 @@ void RIFF::File::read() break; } - if(tell() + chunkSize > uint(length())) { + if(static_cast(tell()) + chunkSize > static_cast(length())) { debug("RIFF::File::read() -- Chunk '" + chunkName + "' has invalid size (larger than the file size)"); setValid(false); break; -- 2.40.0