Skip to content

Commit

Permalink
Fix possible heap buffer overflow in MP4GetVideoProfileLevel().
Browse files Browse the repository at this point in the history
  • Loading branch information
enzo1982 committed Apr 3, 2023
1 parent c9b726d commit aefcd67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mp4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ MP4FileHandle MP4ModifyCallbacks(const MP4IOCallbacks* callbacks,
&foo,
&bufsize)) {
uint8_t *ptr = foo;
while (bufsize > 0) {
while (bufsize >= 5) {
if (MP4V2_HTONL(*(uint32_t *)ptr) == 0x1b0) {
uint8_t ret = ptr[4];
free(foo);
Expand Down

0 comments on commit aefcd67

Please sign in to comment.