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

Git pushed a commit to branch master
in repository ffmpeg.

commit 2326bc5f69c9096cc9fa5a40b07cf5337cf7834e
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Thu Feb 26 03:08:36 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Fri Mar 6 03:37:19 2026 +0100

    avformat/rtsp: Use ff_format_check_set_url()
    
    Fixes: redirect to blacklisted protocol
    Fixes: YWH-PGM40646-41
    
    Found-by: BapToutatis
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavformat/rtsp.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 822780087d..aaad565c2b 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -2170,12 +2170,11 @@ redirect:
     ff_rtsp_close_streams(s);
     ff_rtsp_close_connections(s);
     if (reply->status_code >=300 && reply->status_code < 400 && s->iformat) {
-        char *new_url = av_strdup(reply->location);
-        if (!new_url) {
-            err = AVERROR(ENOMEM);
+        int ret = ff_format_check_set_url(s, reply->location);
+        if (ret < 0) {
+            err = ret;
             goto fail2;
         }
-        ff_format_set_url(s, new_url);
         rt->session_id[0] = '\0';
         av_log(s, AV_LOG_INFO, "Status %d: Redirecting to %s\n",
                reply->status_code,

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

Reply via email to