]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - providers/implementations/ciphers/ciphercommon_ccm.c
Fix a gcc warning about possible null pointer
[thirdparty/openssl.git] / providers / implementations / ciphers / ciphercommon_ccm.c
index edb8e81bf9869af0a2d242239d5137ea19466084..f1f143ff6f807cab0656cda06405babe08f53197 100644 (file)
@@ -307,7 +307,7 @@ static int ccm_tls_cipher(PROV_CCM_CTX *ctx,
     size_t olen = 0;
 
     /* Encrypt/decrypt must be performed in place */
-    if (out != in || len < (EVP_CCM_TLS_EXPLICIT_IV_LEN + (size_t)ctx->m))
+    if (in == NULL || out != in || len < EVP_CCM_TLS_EXPLICIT_IV_LEN + ctx->m)
         goto err;
 
     /* If encrypting set explicit IV from sequence number (start of AAD) */