Fix minor issues and add a regress test#971
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR addresses several static-analysis findings around resource cleanup and control flow, and adds a regression unit test for IdentifyAsn1Key.
Changes:
- Fix key cleanup on ASN.1 decode failure paths in
IdentifyAsn1Key. - Fix KEX DH reply control flow and tighten SFTP buffer/resource management.
- Add a regression unit test with embedded DER test keys for
IdentifyAsn1Key.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
tests/unit.c |
Adds self-contained DER fixtures and a regression test covering IdentifyAsn1Key failure-path cleanup. |
src/wolfsftp.c |
Removes dead free and adds frees on early-return error paths to avoid leaks. |
src/internal.c |
Ensures key objects are freed on decode failures and corrects Curve25519/ECDH control flow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ejohnstown
approved these changes
May 12, 2026
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 fixes minor issues addressed by static analysis.
Issues: F-861, F-862, F-1273, F-1680 and F-1681