]> git.ipfire.org Git - thirdparty/curl.git/commit
strparse: switch to curl_off_t as base data type
authorDaniel Stenberg <daniel@haxx.se>
Fri, 14 Feb 2025 10:29:08 +0000 (11:29 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 15 Feb 2025 20:58:48 +0000 (21:58 +0100)
commitb4538ec5229d716baa5e09b0f41b77c08c849c04
tree7c16deff33989e0a876ee10ba8d007d2ba91a19f
parent876db1070bf3bee5e35ac0d2ebe612e313093262
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
46 files changed:
lib/.checksrc
lib/Makefile.inc
lib/altsvc.c
lib/cf-socket.c
lib/cfilters.c
lib/conncache.c
lib/cookie.c
lib/curl_ctype.h
lib/curl_range.c
lib/ftp.c
lib/ftplistparser.c
lib/getinfo.c
lib/hostip.c
lib/hsts.c
lib/http.c
lib/imap.c
lib/ldap.c
lib/openldap.c
lib/parsedate.c
lib/request.c
lib/rtsp.c
lib/smtp.c
lib/strcase.c
lib/strequal.c [new file with mode: 0644]
lib/strparse.c
lib/strparse.h
lib/strtoofft.c
lib/strtoofft.h
lib/telnet.c
lib/tftp.c
lib/url.c
lib/urlapi.c
lib/vquic/.checksrc
lib/vquic/vquic.c
lib/vssh/libssh.c
lib/vssh/libssh2.c
lib/vssh/wolfssh.c
lib/vtls/.checksrc
lib/vtls/schannel.c
lib/ws.c
projects/generate.bat
src/Makefile.inc
tests/data/test1664
tests/server/Makefile.inc
tests/unit/unit1664.c
winbuild/MakefileBuild.vc