-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
missing limits.h in bignum.c #4929
Comments
How are you building the library exactly? In Mbed TLS 3.0 there's an inclusion chain This is a genuine bug in 2.16 and 2.2x where the inclusion of |
Yes, my config.h did not include check_config.h. Does it need to? If yes then this is my fault. |
With Mbed TLS 3.0.0+, there shouldn't be a way to bypass With Mbed TLS 2.x, it is possible to bypass |
Fixes Mbed-TLS#4929 Signed-off-by: Tom Cosgrove <[email protected]>
Fixes Mbed-TLS#4929 Signed-off-by: Dave Rodgman <[email protected]>
Fixes Mbed-TLS#4929 Signed-off-by: Tom Cosgrove <[email protected]>
Summary
File library/bignum.c is using CHAR_BIT macro but does not include limits.h.
The file does not compile when other included headers do not include limits.h, for instance on Linux/glibc/gcc 10.3.0.
System information
Mbed TLS version (number or commit id): 3c28fd3
Operating system and version: Gentoo Linux x86_64, glibc
Configuration (if not default, please attach
mbedtls_config.h
):Compiler and options (if you used a pre-built binary, please indicate how you obtained it): -O2 -march=native
Additional environment information:
Expected behavior
everything compiles
Actual behavior
library/bignum.c does not compile
Steps to reproduce
Attempt to build with gcc 10.3.0 on Glibc'ish Linux with MBEDTLS_BIGNUM_C is enabled
Additional information
I suggest that you add #include <limits.h> to bignum.c.
The text was updated successfully, but these errors were encountered: