Skip to content

Commit

Permalink
avcinfo: 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 d83f07c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/C++/Apps/AvcInfo/AvcInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ main(int argc, char** argv)
const char* primary_pic_type_name = AP4_AvcNalParser::PrimaryPicTypeName(primary_pic_type);
if (primary_pic_type_name == NULL) primary_pic_type_name = "UNKNOWN";
printf(" [%d:%s]\n", primary_pic_type, primary_pic_type_name);
} else if (nalu_type == 1 || nalu_type == 2 || nalu_type == 5 || nalu_type == 19) {
} else if ((nalu_type == 1 || nalu_type == 2 || nalu_type == 5 || nalu_type == 19)
&& nalu->GetDataSize() > 1) {
PrintSliceInfo(&nalu_payload[1]);
printf("\n");
} else {
Expand Down

0 comments on commit d83f07c

Please sign in to comment.