tag/Aiff: the FORM chunk size is big-endian

Was broken by commit 8a86460b8f

Closes #87
This commit is contained in:
Max Kellermann 2017-07-31 13:46:09 +02:00
parent cf0c59864f
commit dd9fd3d8a7
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@ -1,6 +1,8 @@
ver 0.20.10 (not yet released)
* decoder
- ffmpeg: support MusicBrainz ID3v2 tags
* tags
- aiff: fix FORM chunk size endianess (is big-endian)
ver 0.20.9 (2017/06/04)
* decoder

View File

@ -49,7 +49,7 @@ aiff_seek_id3(InputStream &is)
aiff_header header;
is.ReadFull(&header, sizeof(header));
if (memcmp(header.id, "FORM", 4) != 0 ||
(is.KnownSize() && FromLE32(header.size) > is.GetSize()) ||
(is.KnownSize() && FromBE32(header.size) > is.GetSize()) ||
(memcmp(header.format, "AIFF", 4) != 0 &&
memcmp(header.format, "AIFC", 4) != 0))
throw std::runtime_error("Not an AIFF file");