From: Daniel Stenberg Date: Tue, 29 Oct 2024 07:09:32 +0000 (+0100) Subject: setopt: return error for bad input to CURLOPT_RTSP_REQUEST X-Git-Tag: curl-8_11_0~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7a06dee500f222431da7c95a06bf4a86a7c0371;p=thirdparty%2Fcurl.git 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 --- 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;