summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-05-20 00:36:34 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2022-05-26 11:54:05 +0200
commitd84f03609ef36db0cdc48b3bbce3c5cd04bf18a1 (patch)
tree96668845a2ff4462f8f7c308771c548770926a39
parent7bfbd24e71ff523afa1d7e6512cbc70b5d542dc6 (diff)
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>
-rw-r--r--libavformat/matroskadec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 4715f1b7d4..de73f97aca 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -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)