Fixes: 2018-0721-sample
Fixes: null pointer dereference
Found-by: Nikita Knyzhov ([email protected])
Signed-off-by: Michael Niedermayer <[email protected]>
---
libavformat/mov.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index eda3fff6d5..edd7778023 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5846,6 +5846,11 @@ static int mov_read_sample_encryption_info(MOVContext
*c, AVIOContext *pb, MOVSt
unsigned int subsample_count;
AVSubsampleEncryptionInfo *subsamples;
+ if (!sc->cenc.default_encrypted_sample) {
+ av_log(c->fc, AV_LOG_ERROR, "Missing schm or tenc\n");
+ return AVERROR_INVALIDDATA;
+ }
+
*sample = av_encryption_info_clone(sc->cenc.default_encrypted_sample);
if (!*sample)
return AVERROR(ENOMEM);
--
2.18.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel