mirror of
https://github.com/curl/curl.git
synced 2025-02-23 15:10:03 +08:00
telnet: error correctly for WS set to "x[num]"
Follow-up to e4f93be9d5
Reported-by: Harry Sintonen
Closes #10606
This commit is contained in:
parent
5ed7417d2f
commit
cbd3fd7cbb
@ -844,10 +844,10 @@ static CURLcode check_telnet_options(struct Curl_easy *data)
|
||||
char *p;
|
||||
unsigned long x = strtoul(arg, &p, 10);
|
||||
unsigned long y = 0;
|
||||
if(Curl_raw_tolower(*p) == 'x') {
|
||||
if(x && (x <= 0xffff) && Curl_raw_tolower(*p) == 'x') {
|
||||
p++;
|
||||
y = strtoul(p, NULL, 10);
|
||||
if(x && y && (x <= 0xffff) && (y <= 0xffff)) {
|
||||
if(y && (y <= 0xffff)) {
|
||||
tn->subopt_wsx = (unsigned short)x;
|
||||
tn->subopt_wsy = (unsigned short)y;
|
||||
tn->us_preferred[CURL_TELOPT_NAWS] = CURL_YES;
|
||||
|
Loading…
Reference in New Issue
Block a user