Skip to content

Commit

Permalink
Add more error checking for ftyp atom
Browse files Browse the repository at this point in the history
  • Loading branch information
KMojek committed Oct 28, 2024
1 parent e228196 commit 2191f92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/atom_ftyp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ void MP4FtypAtom::Generate()

void MP4FtypAtom::Read()
{
if ( m_size == 0ULL )
return;
if ( m_size < 8ULL )
throw new Exception( "Invalid ftyp atom size", __FILE__, __LINE__, __FUNCTION__ );

compatibleBrands.SetCount( (m_size - 8) / 4 ); // brands array fills rest of atom
MP4Atom::Read();
Expand Down

0 comments on commit 2191f92

Please sign in to comment.