mirror of
https://github.com/taglib/taglib.git
synced 2026-07-11 05:41:22 -04:00
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.
This commit is contained in:
@@ -223,7 +223,7 @@ public:
|
||||
MP4::Atoms::Atoms(File *file) :
|
||||
d(std::make_unique<AtomsPrivate>())
|
||||
{
|
||||
static constexpr int MAX_MP4_ATOM_COUNT_PER_LEVEL = 5000;
|
||||
static constexpr int MAX_MP4_ATOM_COUNT_PER_LEVEL = 50000;
|
||||
|
||||
d->atoms.setAutoDelete(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user