mirror of
https://github.com/curl/curl.git
synced 2026-08-25 00:33:31 +03:00
lib: use Curl_str_number() for parsing decimal numbers
Instead of strtoul() and strtol() calls. Easier API with better integer overflow detection and built-in max check that now comes automatic everywhere this is used. Closes #16319
This commit is contained in:
parent
130b6891c8
commit
b696fc129b
16 changed files with 180 additions and 202 deletions
|
|
@ -93,9 +93,9 @@ Curl_str_number
|
|||
6: ("00000000000000000000000000001234") 0, [1234] line 32
|
||||
7: ("0123 345") 0, [123] line 4
|
||||
8: ("0123O345") 0, [123] line 4
|
||||
9: ("-12") 0, [0] line 0
|
||||
10: (" 123") 0, [0] line 0
|
||||
11: ("") 0, [0] line 0
|
||||
9: ("-12") 8, [0] line 0
|
||||
10: (" 123") 8, [0] line 0
|
||||
11: ("") 8, [0] line 0
|
||||
Curl_str_number / max
|
||||
0: ("9223372036854775808") 0, [9223372036854775808] line 19
|
||||
1: ("9223372036854775809") 0, [9223372036854775809] line 19
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue