Skip to content

Commit

Permalink
Poison more spots
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewhop committed Apr 5, 2024
1 parent 40658d7 commit 4c0a39b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crypto/fipsmodule/cipher/cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) {
EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void) {
EVP_CIPHER_CTX *ctx = OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX));
if (ctx) {
ctx->poisoned = 1;
// NO-OP: struct already zeroed
// EVP_CIPHER_CTX_init(ctx);
}
Expand All @@ -89,6 +90,7 @@ int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c) {
OPENSSL_free(c->cipher_data);

OPENSSL_memset(c, 0, sizeof(EVP_CIPHER_CTX));
c->poisoned = 1;
return 1;
}

Expand Down

0 comments on commit 4c0a39b

Please sign in to comment.