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.
This PR fixes some potential/actual bugs identified by the undefined behaviour sanitizer.
Several of these became apparent with
-Wextra
, mainly through 'unused parameter' warnings, of which there are many.String::replace: Passing nullptr to memcpy is undefined behaviour
axtls sha1: Undefined behaviour
axtls-8266/crypto/sha1.c:124:42: runtime error: left shift of 128 by 24 places cannot be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior axtls-8266/crypto/sha1.c:124:42
Because: implicit conversion of uint8_t to int
Don't force queueCallback with no parameter
Sanitizer reports undefined behaviour passing parameter to function which doesn't expect one.
Works fine in practice but safer to add a lamba for dealing with it.
Stream::parseFloat() not handling timeout
String(unsigned char, ...) ignoring width, pad parameters
char could be signed, check for
> 127
would never succeedHostTests datetime check should use parameter
Fix unimplemented host
RtcClass::setRtcNanoseconds()
Potential array bounds violation in esp-open-lwip dhcp.c
Check for index in range should be first.