]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
telnet: make bad_option() consider NULL a bad option too
authorDaniel Stenberg <daniel@haxx.se>
Mon, 6 Oct 2025 08:56:44 +0000 (10:56 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Oct 2025 14:00:04 +0000 (16:00 +0200)
Follow-up to a72e1552f22
Closes #18873

lib/telnet.c

index 90316a446ccb335b201c4f3be06c68db16f4f496..259a0c8931ce76bc8e5d51af409278705bf12b3b 100644 (file)
@@ -930,7 +930,7 @@ static CURLcode check_telnet_options(struct Curl_easy *data,
    rather just ban its use instead */
 static bool bad_option(const char *data)
 {
-  return !!strchr(data, CURL_IAC);
+  return !data || !!strchr(data, CURL_IAC);
 }
 
 /*