mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
telnet: ignore empty suboptions
To avoid printing from en empty buffer Reported-by: Joshua Rogers Closes #18899
This commit is contained in:
parent
3660e6da80
commit
33380fa214
@ -947,6 +947,9 @@ static CURLcode suboption(struct Curl_easy *data, struct TELNET *tn)
|
||||
int err;
|
||||
struct connectdata *conn = data->conn;
|
||||
|
||||
if(!CURL_SB_LEN(tn)) /* ignore empty suboption */
|
||||
return CURLE_OK;
|
||||
|
||||
printsub(data, '<', (unsigned char *)tn->subbuffer, CURL_SB_LEN(tn) + 2);
|
||||
switch(CURL_SB_GET(tn)) {
|
||||
case CURL_TELOPT_TTYPE:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user