]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
setopt: return error for bad input to CURLOPT_RTSP_REQUEST
authorDaniel Stenberg <daniel@haxx.se>
Tue, 29 Oct 2024 07:09:32 +0000 (08:09 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 29 Oct 2024 08:40:56 +0000 (09:40 +0100)
And leave the value untouched. Previously, an unrecognized argument
would reset it to RTSPREQ_NONE (and still return OK).

Closes #15440

lib/setopt.c

index 48642602a752ed8fc6f77c6ffbbb1d77bf3581d9..4f0697212739ef5e0bbfc7789b48f20544998205 100644 (file)
@@ -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;