projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c676ff4
)
PROV: Avoid NULL dereference in SHA3 dup call.
author
Pauli
<paul.dale@oracle.com>
Wed, 20 Nov 2019 22:41:42 +0000
(08:41 +1000)
committer
Pauli
<paul.dale@oracle.com>
Fri, 22 Nov 2019 05:20:54 +0000
(15:20 +1000)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10487)
providers/implementations/digests/sha3_prov.c
patch
|
blob
|
history
diff --git
a/providers/implementations/digests/sha3_prov.c
b/providers/implementations/digests/sha3_prov.c
index 251039e9920fe5645d643046a6fd6bab4ac55c24..44471959a723f50f0ba9709e5d09bf7cc4b8595f 100644
(file)
--- a/
providers/implementations/digests/sha3_prov.c
+++ b/
providers/implementations/digests/sha3_prov.c
@@
-241,7
+241,8
@@
static void *keccak_dupctx(void *ctx)
KECCAK1600_CTX *in = (KECCAK1600_CTX *)ctx;
KECCAK1600_CTX *ret = OPENSSL_malloc(sizeof(*ret));
- *ret = *in;
+ if (ret != NULL)
+ *ret = *in;
return ret;
}