summaryrefslogtreecommitdiffstats
path: root/providers/implementations/macs/poly1305_prov.c
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2019-12-12 07:34:46 +1000
committerPauli <paul.dale@oracle.com>2019-12-13 10:31:28 +1000
commitebe19ab86c0faf3f02b0c30d8da0d1cadb0fb33a (patch)
treeccc7dbed24ba875e13b260cd484baf3c5cbe85ad /providers/implementations/macs/poly1305_prov.c
parent41a6d557b9e97b71fd178c92981a811face409fb (diff)
mac poly1305: add missing NULL check in new function.
Bug reported by Kihong Heo. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10613)
Diffstat (limited to 'providers/implementations/macs/poly1305_prov.c')
-rw-r--r--providers/implementations/macs/poly1305_prov.c3
1 files changed, 2 insertions, 1 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;
}