Skip to content

fix: check ASN1_STRING_to_UTF8() failure#41

Open
ndossche wants to merge 1 commit intonodejs:mainfrom
ndossche:clesss-4
Open

fix: check ASN1_STRING_to_UTF8() failure#41
ndossche wants to merge 1 commit intonodejs:mainfrom
ndossche:clesss-4

Conversation

@ndossche
Copy link
Copy Markdown
Contributor

This function returns a negative error code on error. When it does so, the value_str pointer will remain uninitialized and cause a crash later on when it is freed by OPENSSL_free(). Even if it wouldn't crash there, it still fails to signal the error and an empty string may be propagated to the callers.

Note: this was found by a static-dynamic analyser I'm developing.

This function returns a negative error code on error.
When it does so, the `value_str` pointer will remain uninitialized and
cause a crash later on when it is freed by OPENSSL_free().
Even if it wouldn't crash there, it still fails to signal the error and
an empty string may be propagated to the callers.
@ndossche ndossche changed the title Check ASN1_STRING_to_UTF8() failure fix: check ASN1_STRING_to_UTF8() failure Apr 13, 2026
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.

1 participant