The branch, master has been updated
via b39989604613b376dab969973e66c7230317926f (commit)
from 4c4ab2ec6ff97a66a821b3c539b75e19b2831f93 (commit)
- Log -----------------------------------------------------------------
commit b39989604613b376dab969973e66c7230317926f
Author: Hendi <[email protected]>
AuthorDate: Sun Nov 2 23:11:02 2025 +0100
Commit: Marton Balint <[email protected]>
CommitDate: Tue Nov 18 22:10:34 2025 +0000
avformat/dashdec: Fix urls with special characters in manifest
This was especially a problem with ampersands, which occur
frequently as part of query parameters.
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 1f59d3a41c..500d8ca518 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -780,7 +780,13 @@ static int resolve_content_path(AVFormatContext *s, const
char *url, int *max_ur
}
root_url = (av_strcasecmp(baseurl, "")) ? baseurl : path;
if (node) {
- xmlNodeSetContent(node, root_url);
+ xmlChar *escaped = xmlEncodeSpecialChars(NULL, root_url);
+ if (!escaped) {
+ updated = AVERROR(ENOMEM);
+ goto end;
+ }
+ xmlNodeSetContent(node, escaped);
+ xmlFree(escaped);
updated = 1;
}
@@ -814,9 +820,15 @@ static int resolve_content_path(AVFormatContext *s, const
char *url, int *max_ur
memset(p + 1, 0, strlen(p));
}
av_strlcat(tmp_str, text + start, tmp_max_url_size);
- xmlNodeSetContent(baseurl_nodes[i], tmp_str);
- updated = 1;
xmlFree(text);
+ xmlChar* escaped = xmlEncodeSpecialChars(NULL, tmp_str);
+ if (!escaped) {
+ updated = AVERROR(ENOMEM);
+ goto end;
+ }
+ xmlNodeSetContent(baseurl_nodes[i], escaped);
+ updated = 1;
+ xmlFree(escaped);
}
}
-----------------------------------------------------------------------
Summary of changes:
libavformat/dashdec.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]