mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 03:52:22 +02:00
demux_mkv: ignore duplicated BlockAdditions to avoid memory leak
This can happen only on invalid files. Found by OSS-Fuzz.
This commit is contained in:
parent
b13642e115
commit
9158653982
@ -3065,7 +3065,7 @@ static int read_block_group(demuxer_t *demuxer, int64_t end,
|
||||
if (ebml_read_element(s, &parse_ctx, &additions,
|
||||
&ebml_block_additions_desc) < 0)
|
||||
return -1;
|
||||
if (additions.n_block_more > 0) {
|
||||
if (additions.n_block_more > 0 && !block->additions) {
|
||||
block->additions = talloc_dup(NULL, &additions);
|
||||
talloc_steal(block->additions, parse_ctx.talloc_ctx);
|
||||
parse_ctx.talloc_ctx = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user