Skip to content

Fix incorrect error path in ecc_sign_hash_internal.c - #816

Merged
karel-m merged 2 commits into
libtom:developfrom
headscott:fix/801-fix-error-path-ecc-sign-hash
Nov 17, 2026
Merged

karel-m merged 2 commits into
libtom:developfrom
headscott:fix/801-fix-error-path-ecc-sign-hash

Conversation

@headscott

Copy link
Copy Markdown
Contributor

Description

This pull request fixes an incorrect error handling path in ecc_sign_hash_internal.c mentioned in #801.

When the input buffer exceeds MAXBLOCKSIZE, the code previously jumped to the error label, potentially causing ecc_free to operate on an uninitialized pubkey.

The error path has been corrected to jump to errnokey instead, avoiding cleanup of an uninitialized key.

Closes #801

@karel-m
karel-m merged commit 02ec717 into libtom:develop Nov 17, 2026
@karel-m

karel-m commented Nov 17, 2026

Copy link
Copy Markdown
Member

agree #801 is a bug and this is a proper fix

merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix incorrect error path in ecc_sign_hash_internal.c

2 participants