Consider FLAC file as being invalid if a 0 length block is found

This commit is contained in:
Arnaud Bienner 2012-10-07 03:04:02 +02:00
parent 2d7414733e
commit ad9ffc62e6

View File

@ -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;