MP4 reader: skip cover art images of unknown type instead of assuming JPEG

This commit is contained in:
Moritz Bunkus 2019-11-08 16:52:39 +01:00
parent 2a7becf502
commit 0a045837a5
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
2 changed files with 5 additions and 0 deletions

View File

@ -15,6 +15,8 @@
art images. This could cause file identification to fail when the cover art art images. This could cause file identification to fail when the cover art
was located at the end of the MP4 file. Even if it succeeded, this meant too was located at the end of the MP4 file. Even if it succeeded, this meant too
much data present in the attachment. Fixes #2650. much data present in the attachment. Fixes #2650.
* mkvmerge: MP4 reader: covert art images with unknown image types will be
skipped instead of treated as JPEG images.
## Build system changes ## Build system changes

View File

@ -1052,6 +1052,9 @@ qtmp4_reader_c::handle_covr_atom(qt_atom_t parent,
try { try {
auto type = m_in->read_uint32_be(); auto type = m_in->read_uint32_be();
if (!mtx::included_in<int>(type, MP4ADT_BMP, MP4ADT_JPEG, MP4ADT_PNG))
return;
m_in->skip(4); m_in->skip(4);
data_size -= 8; data_size -= 8;