Skip to content

Commit

Permalink
fix oob in #948
Browse files Browse the repository at this point in the history
  • Loading branch information
QWeiheng committed Apr 2, 2024
1 parent f6b5e5b commit 2ac2417
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/C++/Core/Ap4Stz2Atom.cpp
Expand Up @@ -104,7 +104,7 @@ AP4_Stz2Atom::AP4_Stz2Atom(AP4_UI32 size,
delete[] buffer;
return;
}
if (sample_count > sizeof(buffer)) return;
if (2 * 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 2ac2417

Please sign in to comment.