From: Arnaud Bienner Date: Sun, 7 Oct 2012 01:04:02 +0000 (+0200) Subject: Consider FLAC file as being invalid if a 0 length block is found X-Git-Tag: v1.9~84^2~6^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad9ffc62e6fac5c47f46eb96b39c614e32742eb5;p=taglib Consider FLAC file as being invalid if a 0 length block is found --- diff --git a/taglib/flac/flacfile.cpp b/taglib/flac/flacfile.cpp index a02770a8..775fed90 100644 --- a/taglib/flac/flacfile.cpp +++ b/taglib/flac/flacfile.cpp @@ -425,7 +425,7 @@ void FLAC::File::scan() length = header.mid(1, 3).toUInt(); ByteVector data = readBlock(length); - if(data.size() != length) { + if(data.size() != length || length == 0) { debug("FLAC::File::scan() -- FLAC stream corrupted"); setValid(false); return;