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

From dd01947397b98e94c3f2a79d5820aaf4594f4d3b Mon Sep 17 00:00:00 2001
From: James Almer <jamrial@gmail.com>
Date: Tue, 15 Oct 2019 11:38:23 -0300
Subject: [PATCH] avformat/latmenc: abort if no extradata is available

Fixes ticket #8273.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/latmenc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c
index db867ebf1a..5ae677f5da 100644
--- a/libavformat/latmenc.c
+++ b/libavformat/latmenc.c
@@ -176,7 +176,8 @@ static int latm_write_packet(AVFormatContext *s, AVPacket *pkt)
                 if (ret < 0)
                     return ret;
                 memcpy(par->extradata, side_data, side_data_size);
-            }
+            } else
+                return AVERROR_INVALIDDATA;
         }
     }
 
-- 
2.33.0

openSUSE Build Service is sponsored by