Commit 4aa15a1ba5 for ffmpeg

commit 4aa15a1ba50973e9d0766361d74af4d481c26f00
Author: Kacper Michajłow <kasper93@gmail.com>
Date:   Fri Oct 16 19:54:31 2026 +0200

    avformat/dashdec: fail when an attribute value cannot be read

    xmlGetProp() returns NULL on allocation failure. The MPD and Period
    attribute loops passed the result to get_duration_insec(), and the
    SegmentTimeline loop retried the same attribute instead of failing.

    Signed-off-by: Kacper Michajłow <kasper93@gmail.com>

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index cf88d86b0a..8b0fb0361d 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -698,8 +698,8 @@ static int parse_manifest_segmenttimeline(AVFormatContext *s, struct representat
             val = xmlGetProp(fragment_timeline_node, attr->name);

             if (!val) {
-                av_log(s, AV_LOG_WARNING, "parse_manifest_segmenttimeline attr->name = %s val is NULL\n", attr->name);
-                continue;
+                av_free(tml);
+                return AVERROR(ENOMEM);
             }

             if (!av_strcasecmp(attr->name, "t")) {
@@ -1362,6 +1362,10 @@ static int parse_manifest(AVFormatContext *s, const char *url, AVIOContext *in)
         attr = node->properties;
         while (attr) {
             val = xmlGetProp(node, attr->name);
+            if (!val) {
+                ret = AVERROR(ENOMEM);
+                goto cleanup;
+            }

             if (!av_strcasecmp(attr->name, "availabilityStartTime")) {
                 c->availability_start_time = get_utc_date_time_insec(s, val);
@@ -1408,6 +1412,10 @@ static int parse_manifest(AVFormatContext *s, const char *url, AVIOContext *in)
                 attr = node->properties;
                 while (attr) {
                     val = xmlGetProp(node, attr->name);
+                    if (!val) {
+                        ret = AVERROR(ENOMEM);
+                        goto cleanup;
+                    }
                     if (!av_strcasecmp(attr->name, "duration")) {
                         period_duration_sec = get_duration_insec(s, val);
                     } else if (!av_strcasecmp(attr->name, "start")) {