From f09a84c4ae46ccaa34498e6292831401f4d65529 Mon Sep 17 00:00:00 2001 From: Urs Fleisch Date: Sat, 11 Jul 2026 09:05:17 +0200 Subject: [PATCH] Enlarge MP4 atom sibling count at top level limit (#1344) The MAX_MP4_ATOM_COUNT_PER_LEVEL of 5000 seems to be too restrictive, a legitimate file with 5390 atoms was reported to have been rejected. The crafted file from #1344 had 653789 atoms at the top level, which freezed the read process for 15s on my system. Enlarging the limit to 50000 should be sufficient and will stop the crafted file after 2s. --- taglib/mp4/mp4atom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taglib/mp4/mp4atom.cpp b/taglib/mp4/mp4atom.cpp index b279ab05..1320277e 100644 --- a/taglib/mp4/mp4atom.cpp +++ b/taglib/mp4/mp4atom.cpp @@ -223,7 +223,7 @@ public: MP4::Atoms::Atoms(File *file) : d(std::make_unique()) { - static constexpr int MAX_MP4_ATOM_COUNT_PER_LEVEL = 5000; + static constexpr int MAX_MP4_ATOM_COUNT_PER_LEVEL = 50000; d->atoms.setAutoDelete(true);