Skip to content

Fix static analysis warnings for GOST_cipher_ctx_iv_length returning -1#525

Merged
chipitsine merged 1 commit intogost-engine:masterfrom
Mironenko:f-iv-length
Apr 18, 2026
Merged

Fix static analysis warnings for GOST_cipher_ctx_iv_length returning -1#525
chipitsine merged 1 commit intogost-engine:masterfrom
Mironenko:f-iv-length

Conversation

@Mironenko
Copy link
Copy Markdown
Contributor

This PR addresses a Coverity report about an increased number of issues caused by GOST_cipher_ctx_iv_length returning -1 on error (see #523 (comment)). This behavior was introduced in 4e6e331.

While the implementation matches EVP_CIPHER_CTX_iv_length, which it replaces, returning 0 on error is safer. An assertion is added in debug builds to catch such cases.

@chipitsine chipitsine merged commit a6039df into gost-engine:master Apr 18, 2026
11 checks passed
@chipitsine
Copy link
Copy Markdown
Contributor

image

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.

2 participants