[openssl] master update
bernd.edlinger at hotmail.de
bernd.edlinger at hotmail.de
Fri Apr 3 10:58:42 UTC 2020
The branch master has been updated
via e2bf331bc0c735ebd8d9b86725bc3dc32245f986 (commit)
from 70d80ef9898ddbe03841efd2df2f526b71829d7f (commit)
- Log -----------------------------------------------------------------
commit e2bf331bc0c735ebd8d9b86725bc3dc32245f986
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date: Sun Nov 3 19:36:11 2019 +0100
Fix a gcc warning about possible null pointer
In function 'ccm_tls_cipher',
inlined from 'ccm_cipher_internal' at providers/common/ciphers/cipher_ccm.c:359:16,
inlined from 'ccm_stream_final' at providers/common/ciphers/cipher_ccm.c:265:9:
providers/common/ciphers/cipher_ccm.c:317:5: error: argument 2 null where non-null expected [-Werror=nonnull]
317 | memcpy(ctx->iv + EVP_CCM_TLS_FIXED_IV_LEN, in, EVP_CCM_TLS_EXPLICIT_IV_LEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/internal/cryptlib.h:14,
from providers/common/include/prov/ciphercommon.h:14,
from providers/common/ciphers/cipher_ccm.c:12:
providers/common/ciphers/cipher_ccm.c: In function 'ccm_stream_final':
/home/ed/gnu/arm-linux-gnueabihf-linux64/arm-linux-gnueabihf/sys-include/string.h:44:14: note: in a call to function 'memcpy' declared here
44 | extern void *memcpy (void *__restrict __dest,
| ^~~~~~
[extended tests]
Reviewed-by: Paul Dale <paul.dale at oracle.com>
(Merged from https://github.com/openssl/openssl/pull/10344)
-----------------------------------------------------------------------
Summary of changes:
providers/implementations/ciphers/ciphercommon_ccm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/providers/implementations/ciphers/ciphercommon_ccm.c b/providers/implementations/ciphers/ciphercommon_ccm.c
index edb8e81bf9..f1f143ff6f 100644
--- a/providers/implementations/ciphers/ciphercommon_ccm.c
+++ b/providers/implementations/ciphers/ciphercommon_ccm.c
@@ -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) */
More information about the openssl-commits
mailing list