[FFmpeg-devel] [PATCH 04/21] avformat/dashdec: Don't overwrite and leak old initialization fragments

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Sat Sep 19 19:35:53 EEST 2020


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
One could also error out instead.

 libavformat/dashdec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index d84da16dbd..3f51e079cf 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -614,6 +614,7 @@ static int parse_manifest_segmenturlnode(AVFormatContext *s, struct representati
         initialization_val = xmlGetProp(fragmenturl_node, "sourceURL");
         range_val = xmlGetProp(fragmenturl_node, "range");
         if (initialization_val || range_val) {
+            free_fragment(&rep->init_section);
             rep->init_section = get_Fragment(range_val);
             if (!rep->init_section) {
                 xmlFree(initialization_val);
-- 
2.25.1



More information about the ffmpeg-devel mailing list