1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/matroskadec: assert non NULL buf

The code is only called if size is > 0 so buf should not be NULL

Helps: CID610554

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2022-05-20 00:36:34 +02:00
parent 7bfbd24e71
commit d84f03609e

View File

@ -3701,6 +3701,8 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, AVBufferRef *buf
uint64_t num;
int trust_default_duration;
av_assert1(buf);
ffio_init_context(&pb, data, size, 0, NULL, NULL, NULL, NULL);
if ((n = ebml_read_num(matroska, &pb.pub, 8, &num, 1)) < 0)