Skip to content

Commit 2191f92

Browse files
committed
Add more error checking for ftyp atom
1 parent e228196 commit 2191f92

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/atom_ftyp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ void MP4FtypAtom::Generate()
5353

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

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

0 commit comments

Comments
 (0)