Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* Re: [FFmpeg-devel] [PATCH] libavformat/dashdec.c Fix for ticket #7395
@ 2024-02-02  9:49 Pablo Navarro
  0 siblings, 0 replies; 5+ messages in thread
From: Pablo Navarro @ 2024-02-02  9:49 UTC (permalink / raw)
  To: ffmpeg-devel

Shouldn't the result of xmlEncodeEntitiesReentrant(NULL, root_url) be freed
with av_free or xmlFree?

xmlChar *tmp_str = NULL;
tmp_str = xmlEncodeEntitiesReentrant(NULL, root_url);
xmlNodeSetContent(node, tmp_str);
xmlFree(tmp_str);
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [FFmpeg-devel] [PATCH] libavformat/dashdec.c Fix for ticket #7395
  2023-12-07  8:32 ` Anton Khirnov
@ 2023-12-07 22:01   ` Evgeniy Pantyuhin via ffmpeg-devel
  0 siblings, 0 replies; 5+ messages in thread
From: Evgeniy Pantyuhin via ffmpeg-devel @ 2023-12-07 22:01 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Evgeniy Pantyuhin

Hello Anton,

Thursday, December 7, 2023, 8:32:33 PM, you wrote:

>>libavformat/dashdec.c Fix for ticket #7395

> "fix bug" is not a useful commit message


DASH demuxing error "unterminated entity reference" due to ampersand in URL

Commit 7a63da8 broke the DASH demuxer if the manifest contains a BaseURL with an ampersand (&) or other characters that need to be escaped in XML.
This is because the method resolve_content_path calls xmlNodeGetContent, which unescapes the string, and then passes it back to xmlNodeSetContent, which apparently expects an escaped string.
Unfortunately I cannot provide an example MPD, but it should be easy enough to manufacture one by simply adding &v=3 or so to the BaseURL in a simple manifest.

-- 
Best regards,
 Evgeniy                            mailto:pntxn@mail.ru

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [FFmpeg-devel] [PATCH] libavformat/dashdec.c Fix for ticket #7395
  2023-12-06 20:32 Evgeniy Pantyuhin via ffmpeg-devel
  2023-12-07  3:56 ` Steven Liu
@ 2023-12-07  8:32 ` Anton Khirnov
  2023-12-07 22:01   ` Evgeniy Pantyuhin via ffmpeg-devel
  1 sibling, 1 reply; 5+ messages in thread
From: Anton Khirnov @ 2023-12-07  8:32 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Evgeniy Pantyuhin

>libavformat/dashdec.c Fix for ticket #7395

"fix bug" is not a useful commit message

-- 
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [FFmpeg-devel] [PATCH] libavformat/dashdec.c Fix for ticket #7395
  2023-12-06 20:32 Evgeniy Pantyuhin via ffmpeg-devel
@ 2023-12-07  3:56 ` Steven Liu
  2023-12-07  8:32 ` Anton Khirnov
  1 sibling, 0 replies; 5+ messages in thread
From: Steven Liu @ 2023-12-07  3:56 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Evgeniy Pantyuhin

Evgeniy Pantyuhin via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
于2023年12月7日周四 04:32写道:
>
> Signed-off-by: Evgeniy <pntxn@mail.ru>
> ---
>  libavformat/dashdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
> index 29d4680..36e4719 100644
> --- a/libavformat/dashdec.c
> +++ b/libavformat/dashdec.c
> @@ -768,7 +768,7 @@ static int resolve_content_path(AVFormatContext *s, const char *url, int *max_ur
>      baseurl = xmlNodeGetContent(node);
>      root_url = (av_strcasecmp(baseurl, "")) ? baseurl : path;
>      if (node) {
> -        xmlNodeSetContent(node, root_url);
> +        xmlNodeSetContent(node, xmlEncodeEntitiesReentrant(NULL, root_url));
>          updated = 1;
>      }
>
> --
> 2.40.0.windows.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".


LGTM
Thanks
Steven
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [FFmpeg-devel] [PATCH] libavformat/dashdec.c Fix for ticket #7395
@ 2023-12-06 20:32 Evgeniy Pantyuhin via ffmpeg-devel
  2023-12-07  3:56 ` Steven Liu
  2023-12-07  8:32 ` Anton Khirnov
  0 siblings, 2 replies; 5+ messages in thread
From: Evgeniy Pantyuhin via ffmpeg-devel @ 2023-12-06 20:32 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Evgeniy Pantyuhin

Signed-off-by: Evgeniy <pntxn@mail.ru>
---
 libavformat/dashdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 29d4680..36e4719 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -768,7 +768,7 @@ static int resolve_content_path(AVFormatContext *s, const char *url, int *max_ur
     baseurl = xmlNodeGetContent(node);
     root_url = (av_strcasecmp(baseurl, "")) ? baseurl : path;
     if (node) {
-        xmlNodeSetContent(node, root_url);
+        xmlNodeSetContent(node, xmlEncodeEntitiesReentrant(NULL, root_url));
         updated = 1;
     }
 
-- 
2.40.0.windows.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-02  9:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-02  9:49 [FFmpeg-devel] [PATCH] libavformat/dashdec.c Fix for ticket #7395 Pablo Navarro
  -- strict thread matches above, loose matches on Subject: below --
2023-12-06 20:32 Evgeniy Pantyuhin via ffmpeg-devel
2023-12-07  3:56 ` Steven Liu
2023-12-07  8:32 ` Anton Khirnov
2023-12-07 22:01   ` Evgeniy Pantyuhin via ffmpeg-devel

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git