mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
matroskadec: prevent access of elements after freeing
Using the decode interrupt feature of ffmpeg may cause crashes by accessing previously freed pointers in matroska_read_close. To prevent this reset nb_elem to zero after freeing the elements, because ffmpeg normally tests for nb_elem. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
parent
2475858889
commit
18b9466937
@ -1237,6 +1237,7 @@ static void ebml_free(EbmlSyntax *syntax, void *data)
|
||||
j++, ptr += syntax[i].list_elem_size)
|
||||
ebml_free(syntax[i].def.n, ptr);
|
||||
av_freep(&list->elem);
|
||||
list->nb_elem = 0;
|
||||
} else
|
||||
ebml_free(syntax[i].def.n, data_off);
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user