Skip to content
New issue

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

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

Already on GitHub? # to your account

Add wrapper for strtoul(,,16) for safely parsing hex strings #183

Merged
merged 1 commit into from
Dec 22, 2024

Conversation

notroj
Copy link
Owner

@notroj notroj commented Dec 16, 2024

    Add wrapper for strtoul(,,16) for safely parsing hex strings:
    
    * src/ne_string.c (ne_strhextoul): New function.
    
    * test/string-tests.c (strhextoul): Add test case.
    
    * src/ne_request.c (read_response_block): Use ne_strhextoul()
      rather than strtoul.
    
    * src/ne_auth.c (verify_digest_response): Likewise.
    
    * src/neon.vers, src/ne_string.h: Add new API.

* src/ne_string.c (ne_strhextoul): New function.

* test/string-tests.c (strhextoul): Add test case.

* src/ne_request.c (read_response_block): Use ne_strhextoul()
  rather than strtoul.

* src/ne_auth.c (verify_digest_response): Likewise.

* src/neon.vers, src/ne_string.h: Add new API.
@notroj notroj merged commit 1e7c960 into master Dec 22, 2024
146 checks passed
@notroj notroj deleted the strhextoul branch December 22, 2024 16:55
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant