Skip to content

Commit

Permalink
add bound check in AP4_Stz2Atom::AP4_Stz2Atom
Browse files Browse the repository at this point in the history
  • Loading branch information
QWeiheng authored Apr 2, 2024
1 parent 525027c commit f6b5e5b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Source/C++/Core/Ap4Stz2Atom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ AP4_Stz2Atom::AP4_Stz2Atom(AP4_UI32 size,
delete[] buffer;
return;
}
if (sample_count > sizeof(buffer)) return;
m_SampleCount = sample_count;
m_Entries.SetItemCount((AP4_Cardinal)sample_count);
switch (m_FieldSize) {
Expand Down

0 comments on commit f6b5e5b

Please sign in to comment.