File ffmpeg-CVE-2020-21688.patch of Package ffmpeg.27460

diff --unified --recursive --text --new-file --color ffmpeg-3.4.2.old/libavformat/movenc.c ffmpeg-3.4.2.new/libavformat/movenc.c
--- ffmpeg-3.4.2.old/libavformat/movenc.c	2021-07-07 09:18:17.149290736 +0800
+++ ffmpeg-3.4.2.new/libavformat/movenc.c	2021-08-12 10:56:27.791935217 +0800
@@ -1465,6 +1465,10 @@
 {
     int tag = track->par->codec_tag;
 
+    // "rtp " is used to distinguish internally created RTP-hint tracks
+    // (with rtp_ctx) from other tracks.
+    if (tag == MKTAG('r','t','p',' '))
+        tag = 0;
     if (!tag || (s->strict_std_compliance >= FF_COMPLIANCE_NORMAL &&
                  (track->par->codec_id == AV_CODEC_ID_DVVIDEO ||
                   track->par->codec_id == AV_CODEC_ID_RAWVIDEO ||
openSUSE Build Service is sponsored by