diff options
author | Pauli <paul.dale@oracle.com> | 2019-12-12 07:34:22 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-12-13 10:31:28 +1000 |
commit | 41a6d557b9e97b71fd178c92981a811face409fb (patch) | |
tree | ab4f99f3d1adb4dbe23b02c7c89e282897228f22 /providers | |
parent | d2b194d78f16493d2eb12bcce285537fcb538bfb (diff) |
mac siphash: add missing NULL check on context creation
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')
-rw-r--r-- | providers/implementations/macs/siphash_prov.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |