Skip to content

Commit

Permalink
hevcinfo: check buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitry-ishenko committed Oct 23, 2021
1 parent 3dc8d58 commit 1865319
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/C++/Apps/HevcInfo/HevcInfo.cpp
Expand Up @@ -122,7 +122,7 @@ main(int argc, char** argv)
(int)nalu->GetDataSize(),
nalu_type,
nalu_type_name);
if (nalu_type == AP4_HEVC_NALU_TYPE_AUD_NUT) {
if (nalu_type == AP4_HEVC_NALU_TYPE_AUD_NUT && nalu->GetDataSize() > 1) {
// Access Unit Delimiter
unsigned int pic_type = (nalu_payload[1]>>5);
const char* pic_type_name = AP4_HevcNalParser::PicTypeName(pic_type);
Expand Down

0 comments on commit 1865319

Please sign in to comment.