telnet: make bad_option() consider NULL a bad option too

Follow-up to a72e1552f2
Closes #18873
This commit is contained in:
Daniel Stenberg 2025-10-06 10:56:44 +02:00
parent 2b0e7cb7c6
commit 92a2125684
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View 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);
}
/*