#7395: DASH demuxing error "unterminated entity reference" due to ampersand in
URL
-------------------------------------+-------------------------------------
Reporter: Starchild | Owner: (none)
Type: defect | Status: open
Priority: normal | Component: avformat
Version: git-master | Resolution:
Keywords: dash | Blocked By:
regression |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by paul31415):
For anyone interested, this fixes the issue:
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 9ae28491e1ecd..41311d6e8f931 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -805,8 +805,10 @@ 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);
+ xmlChar *escaped = xmlEncodeSpecialChars(NULL, escaped);
+ xmlNodeSetContent(baseurl_nodes[i], escaped);
updated = 1;
+ xmlFree(escaped);
xmlFree(text);
}
}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7395#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker_______________________________________________
FFmpeg-trac mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".