Allow zero-length input in _wc_Hash_Grow and fix SHA Copy MAX32666#10035
Open
night1rider wants to merge 2 commits intowolfSSL:masterfrom
Open
Allow zero-length input in _wc_Hash_Grow and fix SHA Copy MAX32666#10035night1rider wants to merge 2 commits intowolfSSL:masterfrom
night1rider wants to merge 2 commits intowolfSSL:masterfrom
Conversation
Added '--enable-all CPPFLAGS=-DWOLFSSL_HASH_KEEP' to the make_check matrix in os-check.yml.
e1d20bd to
92e3647
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 is to fix issues found by the testing of the MAX32666 tests.
Fixes:
Allow zero-length input to
_wc_Hash_Growas a no-op instead of returningBAD_FUNC_ARGAdd
WOLFSSL_HASH_KEEPbuild configuration to CI (os-check.yml) to hopefully catch this and keep current behavior.Also Fixes:
The pr made changes to the copy sequence of the MAX32666 SHA code. after XMEMCPY(dst, src, ctxSz), *dstMsg intentionally holds the source's msg pointer (because the whole src struct was just copied into dst). The PR incorrectly moved srcBuf = *dstMsg before the free/copy, turning it into a dangling pointer and breaking the deep-copy condition.
The fix reverts that specific function to its original logic. The other changes in that commit related to the MAX32666 (AES CBC return values, MAA math fixes, etc.) look fine and don't need reverting.