From: Tsuda Kageyu Date: Mon, 7 Oct 2013 08:00:58 +0000 (+0900) Subject: Fixed detecting RIFF files with invalid chunk sizes X-Git-Tag: v1.9.1~3^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=079e3e0b87911e034ecf1764fe9a5944e51d0cde;p=taglib Fixed detecting RIFF files with invalid chunk sizes --- 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;