Skip to content

Commit 6ef0136

Browse files
committed
Add more error checking for ftyp atom
1 parent e228196 commit 6ef0136

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/atom_ftyp.cpp

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

5454
void MP4FtypAtom::Read()
5555
{
56+
<<<<<<< Updated upstream
5657
if ( m_size == 0ULL )
5758
return;
59+
=======
60+
if ( m_size < 8ULL )
61+
throw new Exception( "Invalid ftyp atom size", __FILE__, __LINE__, __FUNCTION__ );
62+
>>>>>>> Stashed changes
5863

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

0 commit comments

Comments
 (0)