The branch master has been updated via ebe19ab86c0faf3f02b0c30d8da0d1cadb0fb33a (commit) via 41a6d557b9e97b71fd178c92981a811face409fb (commit) from d2b194d78f16493d2eb12bcce285537fcb538bfb (commit)
- Log ----------------------------------------------------------------- commit ebe19ab86c0faf3f02b0c30d8da0d1cadb0fb33a Author: Pauli <paul.d...@oracle.com> Date: Thu Dec 12 07:34:46 2019 +1000 mac poly1305: add missing NULL check in new function. Bug reported by Kihong Heo. Reviewed-by: Richard Levitte <levi...@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10613) commit 41a6d557b9e97b71fd178c92981a811face409fb Author: Pauli <paul.d...@oracle.com> Date: Thu Dec 12 07:34:22 2019 +1000 mac siphash: add missing NULL check on context creation Bug reported by Kihong Heo. Reviewed-by: Richard Levitte <levi...@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10613) ----------------------------------------------------------------------- Summary of changes: providers/implementations/macs/poly1305_prov.c | 3 ++- providers/implementations/macs/siphash_prov.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/providers/implementations/macs/poly1305_prov.c b/providers/implementations/macs/poly1305_prov.c index 950704620f..1edd2dc063 100644 --- a/providers/implementations/macs/poly1305_prov.c +++ b/providers/implementations/macs/poly1305_prov.c @@ -45,7 +45,8 @@ static void *poly1305_new(void *provctx) { struct poly1305_data_st *ctx = OPENSSL_zalloc(sizeof(*ctx)); - ctx->provctx = provctx; + if (ctx != NULL) + ctx->provctx = provctx; return ctx; } diff --git a/providers/implementations/macs/siphash_prov.c b/providers/implementations/macs/siphash_prov.c index d1cb5cf1e7..e82f94ce7b 100644 --- a/providers/implementations/macs/siphash_prov.c +++ b/providers/implementations/macs/siphash_prov.c @@ -51,7 +51,8 @@ static void *siphash_new(void *provctx) { struct siphash_data_st *ctx = OPENSSL_zalloc(sizeof(*ctx)); - ctx->provctx = provctx; + if (ctx != NULL) + ctx->provctx = provctx; return ctx; }