decoder/dsf: compare with InputStream::GetRest() instead of ..GetSize()
This commit is contained in:
parent
02cc77cd82
commit
8574bcd494
@ -158,11 +158,8 @@ dsf_read_metadata(Decoder *decoder, InputStream &is,
|
|||||||
data_size -= sizeof(data_chunk);
|
data_size -= sizeof(data_chunk);
|
||||||
|
|
||||||
/* data_size cannot be bigger or equal to total file size */
|
/* data_size cannot be bigger or equal to total file size */
|
||||||
if (is.KnownSize()) {
|
if (is.KnownSize() && data_size > is.GetRest())
|
||||||
const offset_type size = is.GetSize();
|
return false;
|
||||||
if (data_size >= size)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* use the sample count from the DSF header as the upper
|
/* use the sample count from the DSF header as the upper
|
||||||
bound, because some DSF files contain junk at the end of
|
bound, because some DSF files contain junk at the end of
|
||||||
|
Loading…
Reference in New Issue
Block a user