mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +03:00
strparse: switch to curl_off_t as base data type
- add hex and octal parsers to the Curl_str_* family - make curlx_strtoofft use these parsers - remove all use of strtol() and strtoul() in library code - generally use Curl_str_* more than strtoofft, for stricter parsing - supports 64-bit universally, instead of 'long' which differs in size between platforms Extended the unit test 1664 to verify hex and octal parsing. Closes #16336
This commit is contained in:
parent
876db1070b
commit
b4538ec522
46 changed files with 538 additions and 497 deletions
|
|
@ -864,8 +864,8 @@ static CURLcode check_telnet_options(struct Curl_easy *data)
|
|||
/* Window Size */
|
||||
if(strncasecompare(option, "WS", 2)) {
|
||||
const char *p = arg;
|
||||
size_t x = 0;
|
||||
size_t y = 0;
|
||||
curl_off_t x = 0;
|
||||
curl_off_t y = 0;
|
||||
if(Curl_str_number(&p, &x, 0xffff) ||
|
||||
Curl_str_single(&p, 'x') ||
|
||||
Curl_str_number(&p, &y, 0xffff)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue