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
1 changed files with 2 additions and 0 deletions

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)