-
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
Fix: no newline when debug msg over DEBUG_BUF_SIZE #6511
Conversation
Signed-off-by: valord577 <valord577@gmail.com>
Fix trailing white-space Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
Signed-off-by: valord577 <valord577@gmail.com>
Signed-off-by: valord577 <valord577@gmail.com>
Signed-off-by: valord577 <valord577@gmail.com>
Signed-off-by: valord577 <valord577@gmail.com>
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.
LGTM
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.
LGTM. I would ideally like to see a comment next to line 33 specifying that DEBUG_BUF_SIZE must be > 2 rather than just rely on the static assert elsewhere, but it's not a blocker.
Edit: actually, rather than iterate the PR I've just added a comment. If @tom-cosgrove-arm approves we can merge.
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
803658e
:p - Please Use Squash Merging! |
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.
LGTM
Does this need a backport? |
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.
- Missing
#include <assert.h>
- Please backport to
mbedtls-2.28
@@ -69,6 +70,10 @@ void mbedtls_debug_print_msg(const mbedtls_ssl_context *ssl, int level, | |||
char str[DEBUG_BUF_SIZE]; | |||
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; | |||
|
|||
#if defined(static_assert) |
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.
That's never going to trigger without #include <assert.h>
.
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.
Bah, good spot - thanks
Rebased with a fix for the static assert issue in #7607 |
Signed-off-by: valord577 valord577@gmail.com
Description
Fix: no newline when debug msg over DEBUG_BUF_SIZE
Status
READY/IN
!!! Please Use Squash Merging