avformat/http: Check that the protocol of redirects is http or https

Fixes: #YWH-PGM40646-10

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2026-01-06 23:29:18 +01:00
committed by Timo Rothenpieler
parent 80a3ba7d79
commit b9227d49ea
+4
View File
@@ -253,7 +253,11 @@ static int http_open_cnx_internal(URLContext *h, AVDictionary **options)
if (err < 0)
goto end;
}
} else if (strcmp(proto, "http")) {
err = AVERROR(EINVAL);
goto end;
}
if (port < 0)
port = 80;