Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strparse: switch to curl_off_t as base data type #16336

Closed
wants to merge 2 commits into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Feb 14, 2025

  • 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.

@bagder bagder force-pushed the bagder/more-number-parsing branch 2 times, most recently from 845b324 to a9911e7 Compare February 14, 2025 17:18
- 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
@bagder bagder marked this pull request as ready for review February 14, 2025 21:47
@bagder bagder force-pushed the bagder/more-number-parsing branch from a9911e7 to 604eae8 Compare February 14, 2025 22:16
@bagder bagder closed this in b4538ec Feb 15, 2025
@bagder bagder deleted the bagder/more-number-parsing branch February 15, 2025 20:59
vszakats added a commit to vszakats/curl that referenced this pull request Feb 20, 2025
vszakats added a commit to vszakats/curl that referenced this pull request Feb 21, 2025
vszakats added a commit to vszakats/curl that referenced this pull request Feb 21, 2025
vszakats added a commit to vszakats/curl that referenced this pull request Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant