This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 0fe4bd4b435b1de950890d37b1e4df7bae3655b1
Author:     Pavel Kohout <[email protected]>
AuthorDate: Tue Jun 30 21:53:37 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sat Jul 4 23:53:01 2026 +0000

    avformat/imfdec: check for a missing or empty Path in the asset map
    
    Fixes: NULL pointer dereference
    Fixes: vIIX7oqa3coO
    Fixes: 73f6cce9361 (avformat/imf: Demuxer)
    Found-by: Pavel Kohout (Aisle Research)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavformat/imfdec.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c
index def9b2b7a7..85085171cb 100644
--- a/libavformat/imfdec.c
+++ b/libavformat/imfdec.c
@@ -255,7 +255,20 @@ static int 
parse_imf_asset_map_from_xml_dom(AVFormatContext *s,
             return AVERROR_INVALIDDATA;
         }
 
-        uri = xmlNodeGetContent(ff_imf_xml_get_child_element_by_name(node, 
"Path"));
+        xmlNodePtr path_node = ff_imf_xml_get_child_element_by_name(node, 
"Path");
+        if (!path_node) {
+            av_log(s, AV_LOG_ERROR, "Unable to parse asset map XML - missing 
Path element in Chunk\n");
+            ret = AVERROR_INVALIDDATA;
+            break;
+        }
+        uri = xmlNodeGetContent(path_node);
+        if (!uri || !uri[0]) {
+            av_log(s, AV_LOG_ERROR, "Unable to parse asset map XML - empty 
Path element in Chunk\n");
+            xmlFree(uri);
+            ret = AVERROR_INVALIDDATA;
+            break;
+        }
+
         if (!imf_uri_is_url(uri) && !imf_uri_is_unix_abs_path(uri) && 
!imf_uri_is_dos_abs_path(uri))
             asset->absolute_uri = av_append_path_component(base_url, uri);
         else

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to