Commit c77e0cea64 for ffmpeg

commit c77e0cea641316101e94a5404b95e1b0a0aa6ff6
Author: Michael Niedermayer <michael@niedermayer.cc>
Date:   Wed Nov 11 19:38:11 2026 +0100

    avformat/rtsp: reject CR and LF in the request URL

    Fixes: CRLF injection
    Fixes: NyyjMIh7x39e
    Fixes: rtsp_crlf_poc.py
    CRLF injection Replicated through UnModified FFmpeg with a local TCP listener

    Found during triage of the security report iUFdqPjbigVZ (ZDI-CAN-35984)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 9bc389c452..d455438fa5 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1481,6 +1481,8 @@ int ff_rtsp_send_cmd_with_content_async(AVFormatContext *s,

     if (!rt->rtsp_hd_out)
         return AVERROR(ENOTCONN);
+    if (strpbrk(url, "\r\n"))
+        return AVERROR(EINVAL);

     /* Add in RTSP headers */
     out_buf = buf;