mirror of
https://github.com/curl/curl.git
synced 2026-07-24 14:57:17 +03:00
telnet: use pointer[0] for "unknown" option instead of pointer[i]
i is taken from pointer[length-2] (often the IAC byte) before we do length -= 2, so using pointer[i] indexes an arbitrary/stale byte unrelated to the option code. pointer[0] is the suboption’s option code per the telnet SB format, so printing pointer[0] yields correct, stable diagnostics. Closes #18851
This commit is contained in:
parent
c0febf6661
commit
eb88092703
1 changed files with 1 additions and 1 deletions
|
|
@ -732,7 +732,7 @@ static void printsub(struct Curl_easy *data,
|
|||
}
|
||||
}
|
||||
else
|
||||
infof(data, "%d (unknown)", pointer[i]);
|
||||
infof(data, "%d (unknown)", pointer[0]);
|
||||
|
||||
switch(pointer[0]) {
|
||||
case CURL_TELOPT_NAWS:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue