diff options
author | Rajeev Ranjan <ranjan.rajeev@siemens.com> | 2024-03-04 11:41:01 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-05-14 15:38:52 +0200 |
commit | 61f32392dd67d47018ce46f427339e7191426e45 (patch) | |
tree | 167e0f66c0872acac74039648843da58b3f31dcb | |
parent | f5462572a1873482ce38646cbf00dfc483f02068 (diff) |
cipher_null.c: add NULL check
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22903)
-rw-r--r-- | providers/implementations/ciphers/cipher_null.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/providers/implementations/ciphers/cipher_null.c b/providers/implementations/ciphers/cipher_null.c index c911049e2d..81f9fa10be 100644 --- a/providers/implementations/ciphers/cipher_null.c +++ b/providers/implementations/ciphers/cipher_null.c @@ -82,7 +82,7 @@ static int null_cipher(void *vctx, unsigned char *out, size_t *outl, } if (outsize < inl) return 0; - if (in != out) + if (out != NULL && in != out) memcpy(out, in, inl); *outl = inl; return 1; |