]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
cipher_null.c: add NULL check
authorRajeev Ranjan <ranjan.rajeev@siemens.com>
Mon, 4 Mar 2024 10:41:01 +0000 (11:41 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 14 May 2024 13:38:52 +0000 (15:38 +0200)
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)

providers/implementations/ciphers/cipher_null.c

index c911049e2d0b7b1643decb5c3070725145a6793a..81f9fa10be47391e7ec8ef004a787553314dcc1a 100644 (file)
@@ -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;