From 77801c2c0e0e2df99007be845d32e14ce8ace1e8 Mon Sep 17 00:00:00 2001 From: Markus Koschany Date: Sun, 30 Dec 2018 16:51:20 +0100 Subject: [PATCH] CVE-2018-14394 Origin: https://github.com/FFmpeg/FFmpeg/commit/3a2d21bc5f97aa0161db3ae731fc2732be6108b8 Gbp-Pq: Name CVE-2018-14394.patch --- libavformat/movenc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index e48a363..6d99a0a 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -3033,6 +3033,11 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt) else samples_in_chunk = 1; + if (samples_in_chunk < 1) { + av_log(s, AV_LOG_ERROR, "fatal error, input packet contains no samples\n"); + return AVERROR_PATCHWELCOME; + } + /* copy extradata if it exists */ if (trk->vos_len == 0 && enc->extradata_size > 0) { trk->vos_len = enc->extradata_size; -- 2.30.2