From b7a06dee500f222431da7c95a06bf4a86a7c0371 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 29 Oct 2024 08:09:32 +0100 Subject: [PATCH] setopt: return error for bad input to CURLOPT_RTSP_REQUEST And leave the value untouched. Previously, an unrecognized argument would reset it to RTSPREQ_NONE (and still return OK). Closes #15440 --- lib/setopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/setopt.c b/lib/setopt.c index 48642602a7..4f06972127 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -1261,7 +1261,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option, rtspreq = RTSPREQ_RECEIVE; break; default: - rtspreq = RTSPREQ_NONE; + return CURLE_BAD_FUNCTION_ARGUMENT; } data->set.rtspreq = rtspreq;