mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 13:10:37 +00:00
matroskadec: reset size when freeing data.
Fixes null pointer dereference Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
359cd12a43
commit
5e1bacf2d4
@ -770,6 +770,7 @@ static int ebml_read_binary(AVIOContext *pb, int length, EbmlBin *bin)
|
||||
bin->pos = avio_tell(pb);
|
||||
if (avio_read(pb, bin->data, length) != length) {
|
||||
av_freep(&bin->data);
|
||||
bin->size = 0;
|
||||
return AVERROR(EIO);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user