Skip to content

Don't leak CRYPTO_BUFFER when GetByteArrayElements(...) returns NULL during decompression#959

Merged
normanmaurer merged 1 commit intomainfrom
leak_crypto_buffer
Mar 20, 2026
Merged

Don't leak CRYPTO_BUFFER when GetByteArrayElements(...) returns NULL during decompression#959
normanmaurer merged 1 commit intomainfrom
leak_crypto_buffer

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

Motivation:

GetByteArrayElements(...) might return NULL and if so we need to ensure we don't leak the CRYPTO_BUFFER

Modifications:

Only allocate CRYPTO_BUFFER if GetByteArrayElements(...) does not return NULL

Result:

No more leak of CRYPTO_BUFFER in case of failure

…during decompression

Motivation:

GetByteArrayElements(...) might return NULL and if so we need to ensure we don't leak the CRYPTO_BUFFER

Modifications:

Only allocate CRYPTO_BUFFER if GetByteArrayElements(...) does not return NULL

Result:

No more leak of CRYPTO_BUFFER in case of failure
@normanmaurer normanmaurer added this to the 2.0.76.Final milestone Mar 19, 2026
@normanmaurer normanmaurer requested a review from chrisvest March 19, 2026 10:01
@normanmaurer normanmaurer merged commit d3b8042 into main Mar 20, 2026
10 checks passed
@normanmaurer normanmaurer deleted the leak_crypto_buffer branch March 20, 2026 07:14
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