From ad9ffc62e6fac5c47f46eb96b39c614e32742eb5 Mon Sep 17 00:00:00 2001 From: Arnaud Bienner Date: Sun, 7 Oct 2012 03:04:02 +0200 Subject: [PATCH] Consider FLAC file as being invalid if a 0 length block is found --- taglib/flac/flacfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;