-
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
Add limits.h inclusion to ssl_tls.c and udp_proxy.c #1999
Closed
Closed
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8b626f9
Add limits.h inclusion to files missing it
redtangent a272ce9
Add ChangeLog entry for 1803 fix
redtangent 233d7e6
Include check_config.h into all library files
redtangent f8fa662
Remove check_config.h from default config files
redtangent 89b1a9e
Change order of headers in cpp_dummy_build.cpp
simonbutcher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,4 @@ | |
*/ | ||
#define MBEDTLS_SSL_MAX_CONTENT_LEN 1024 | ||
|
||
#include "mbedtls/check_config.h" | ||
|
||
#endif /* MBEDTLS_CONFIG_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,6 +112,4 @@ | |
*/ | ||
#define MBEDTLS_SSL_MAX_CONTENT_LEN 1024 | ||
|
||
#include "mbedtls/check_config.h" | ||
|
||
#endif /* MBEDTLS_CONFIG_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3688,6 +3688,4 @@ | |
#include MBEDTLS_USER_CONFIG_FILE | ||
#endif | ||
|
||
#include "mbedtls/check_config.h" | ||
|
||
#endif /* MBEDTLS_CONFIG_H */ |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's one place where
check_config.h
modifies the configuration.If
check_config.h
is no longer included fromconfig.h
, and thus only included from library code and not from application code, this won't do. Application code and library code must have the same configuration.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only code in the library that is functionally affected by
MBEDTLS_PLATFORM_SNPRINTF_ALT
orMBEDTLS_PLATFORM_VSNPRINTF_ALT
is inplatform.h
andplatform.c
. Application code that is affected by these macros can be reasonably expected to includembedtls/platform.h
. Therefore I think this hack can be adapted to fit inplatform.h
instead.Feature detection (
version_features.c
,query_config
) would no longer report these alt symbols correctly. I think that an acceptable change would be to not set the symbols, but cause their effect inplatform.h
regardless.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fortunately, it turns out that changing the configuration is not necessary:
platform.h
will do its thing (activate an snprintf wrapper) regardless. #3453