projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d64b06
)
siphash: Fail finalization on uninitialized siphash context
author
Tomas Mraz
<tomas@openssl.org>
Thu, 21 Apr 2022 15:07:40 +0000
(17:07 +0200)
committer
Tomas Mraz
<tomas@openssl.org>
Wed, 27 Apr 2022 08:04:53 +0000
(10:04 +0200)
Fixes #18140
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18142)
crypto/siphash/siphash.c
patch
|
blob
|
history
diff --git
a/crypto/siphash/siphash.c
b/crypto/siphash/siphash.c
index 7584255709d6bfaecd1cf73646c7a8ce7480f9fd..bb4c3925af93ccf5e3e02ece48945f74aa936324 100644
(file)
--- a/
crypto/siphash/siphash.c
+++ b/
crypto/siphash/siphash.c
@@
-204,7
+204,7
@@
int SipHash_Final(SIPHASH *ctx, unsigned char *out, size_t outlen)
uint64_t v2 = ctx->v2;
uint64_t v3 = ctx->v3;
- if (outlen != (size_t)ctx->hash_size)
+ if (
ctx->crounds == 0 || outlen == 0 ||
outlen != (size_t)ctx->hash_size)
return 0;
switch (ctx->len) {