Hi! Undefined behaviour was reported in ticket #7981, attached patch tries to fix it.
Please review, Carl Eugen
From d77386d4a18d6d749d15516b5eb6df90507bf1eb Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceffm...@gmail.com> Date: Mon, 1 Jul 2019 01:09:19 +0200 Subject: [PATCH] lavf/nutenc: Do not call memcmp() with NULL argument. Reported in ticket #7981 --- libavformat/nutenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index e9a3bb49db..a3a097aacc 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -791,6 +791,7 @@ static int get_needed_flags(NUTContext *nut, StreamContext *nus, FrameCode *fc, flags |= FLAG_CHECKSUM; if (pkt->size < nut->header_len[fc->header_idx] || (pkt->size > 4096 && fc->header_idx) || + nut->header[fc->header_idx] && memcmp(pkt->data, nut->header[fc->header_idx], nut->header_len[fc->header_idx])) flags |= FLAG_HEADER_IDX; -- 2.22.0
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".