Skip to content

mbedtls: use more size_t to sync up with crypto.h - #1054

Closed
vszakats wants to merge 1 commit into
libssh2:masterfrom
vszakats:mbedtls-more-size_t
Closed

vszakats wants to merge 1 commit into
libssh2:masterfrom
vszakats:mbedtls-more-size_t

Conversation

@vszakats

Copy link
Copy Markdown
Member

Ref: 5a96f49 #846 #879

Fixes #1053
Closes #1054

@vszakats vszakats added the bug label May 30, 2023
@gbaraldi

Copy link
Copy Markdown
Contributor

It would be cool to move most uses of the unsigned long and other non portable types to stdint/stddef types. Also oops this was my bad

@vszakats

Copy link
Copy Markdown
Member Author

This was correct at the time your commit. I changed the type to size_t in crypto.h later on, and missed to update them in these override functions.

There is not much unsigned longs (and unsigned ints) left, but I agree it'd be best to switch away from them where possible.

One thing that might help catching this class of issues early, is if we'd avoid the PP for these function overrides. It would be a tiny bit less efficient due to the extra level of wrapper, but it should be minor.

@vszakats
vszakats force-pushed the mbedtls-more-size_t branch from 6cad964 to f2a5780 Compare May 30, 2023 22:22
@vszakats vszakats changed the title mbedtls: use more size_t to sync up with crypto.h mbedtls: use more size_t to sync up with crypto.h May 30, 2023
@vszakats
vszakats force-pushed the mbedtls-more-size_t branch from 2cee484 to f2a5780 Compare May 30, 2023 23:00
@vszakats vszakats closed this in 1153ebd May 30, 2023
@vszakats
vszakats deleted the mbedtls-more-size_t branch May 30, 2023 23:02
lampmanyao pushed a commit to lampmanyao/libssh2 that referenced this pull request Jul 16, 2023
agreppin pushed a commit to agreppin/libssh2 that referenced this pull request Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compilation of libssh2 v1.11.0 fails on 32-bit platforms

2 participants