avformat/rtsp: Explicitly check protocol

Fixes: redirect to non rtsp protocol
Fixes: YWH-PGM40646-41

Found-by: BapToutatis

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2026-02-27 23:39:28 +01:00
parent 88eb772900
commit ea9e85e549

View File

@@ -1919,7 +1919,8 @@ redirect:
} else if (!strcmp(proto, "satip")) {
av_strlcpy(proto, "rtsp", sizeof(proto));
rt->server_type = RTSP_SERVER_SATIP;
}
} else if (strcmp(proto, "rtsp"))
return AVERROR_INVALIDDATA;
if (*auth) {
av_strlcpy(rt->auth, auth, sizeof(rt->auth));