|
@@ -780,7 +780,13 @@ static int resolve_content_path(AVFormatContext *s, const char *url, int *max_ur
|
|
|
}
|
|
}
|
|
|
root_url = (av_strcasecmp(baseurl, "")) ? baseurl : path;
|
|
root_url = (av_strcasecmp(baseurl, "")) ? baseurl : path;
|
|
|
if (node) {
|
|
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;
|
|
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));
|
|
memset(p + 1, 0, strlen(p));
|
|
|
}
|
|
}
|
|
|
av_strlcat(tmp_str, text + start, tmp_max_url_size);
|
|
av_strlcat(tmp_str, text + start, tmp_max_url_size);
|
|
|
- xmlNodeSetContent(baseurl_nodes[i], tmp_str);
|
|
|
|
|
- updated = 1;
|
|
|
|
|
xmlFree(text);
|
|
xmlFree(text);
|
|
|
|
|
+ xmlChar* escaped = xmlEncodeSpecialChars(NULL, tmp_str);
|
|
|
|
|
+ if (!escaped) {
|
|
|
|
|
+ updated = AVERROR(ENOMEM);
|
|
|
|
|
+ goto end;
|
|
|
|
|
+ }
|
|
|
|
|
+ xmlNodeSetContent(baseurl_nodes[i], escaped);
|
|
|
|
|
+ updated = 1;
|
|
|
|
|
+ xmlFree(escaped);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|