Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion demux/demux_mkv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1819,7 +1819,8 @@ static void parse_vorbis_chmap(struct mp_chmap *channels, unsigned char *data,
if (size < 4)
return;
uint32_t vendor_length = AV_RL32(data);
if (vendor_length + 4 > size) // also check for the next AV_RB32 below
// 4 (vendor_length) + vendor string + 4 (num_headers); subtract to avoid overflow
if (size < 8 || vendor_length > size - 8)
return;
size -= vendor_length + 4;
data += vendor_length + 4;
Expand Down
Loading