diff --git a/NEWS.md b/NEWS.md index 34a1743e4..790012431 100644 --- a/NEWS.md +++ b/NEWS.md @@ -15,6 +15,8 @@ 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 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 diff --git a/src/input/r_qtmp4.cpp b/src/input/r_qtmp4.cpp index 21a5cc3cd..b156d2910 100644 --- a/src/input/r_qtmp4.cpp +++ b/src/input/r_qtmp4.cpp @@ -1052,6 +1052,9 @@ qtmp4_reader_c::handle_covr_atom(qt_atom_t parent, try { auto type = m_in->read_uint32_be(); + if (!mtx::included_in(type, MP4ADT_BMP, MP4ADT_JPEG, MP4ADT_PNG)) + return; + m_in->skip(4); data_size -= 8;