summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2018-10-18 21:30:05 +0000
committertb <>2018-10-18 21:30:05 +0000
commitf2ff1bf1a7e82640afa3d632827235180cf1a6c1 (patch)
tree48f25aefa99a2ee913de793e719b89a75bc52d08 /src
parent60748ef0c65f6ab38d3fe58f27b4c5cecfef4c15 (diff)
downloadopenbsd-f2ff1bf1a7e82640afa3d632827235180cf1a6c1.tar.gz
openbsd-f2ff1bf1a7e82640afa3d632827235180cf1a6c1.tar.bz2
openbsd-f2ff1bf1a7e82640afa3d632827235180cf1a6c1.zip
Avoid a bad out of bounds access that caused intermittent crashes.
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libcrypto/wycheproof/wycheproof.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/regress/lib/libcrypto/wycheproof/wycheproof.go b/src/regress/lib/libcrypto/wycheproof/wycheproof.go
index ff15d30962..a4360d2904 100644
--- a/src/regress/lib/libcrypto/wycheproof/wycheproof.go
+++ b/src/regress/lib/libcrypto/wycheproof/wycheproof.go
@@ -1,4 +1,4 @@
1/* $OpenBSD: wycheproof.go,v 1.81 2018/10/07 04:40:14 tb Exp $ */ 1/* $OpenBSD: wycheproof.go,v 1.82 2018/10/18 21:30:05 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2018 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2018 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org>
@@ -1698,7 +1698,7 @@ func runRSASSATest(rsa *C.RSA, h hash.Hash, sha *C.EVP_MD, mgfSha *C.EVP_MD, sLe
1698 sig = append(sig, 0) 1698 sig = append(sig, 0)
1699 } 1699 }
1700 1700
1701 sigOut := make([]byte, sigLen) 1701 sigOut := make([]byte, C.RSA_size(rsa) - 11)
1702 if sigLen == 0 { 1702 if sigLen == 0 {
1703 sigOut = append(sigOut, 0) 1703 sigOut = append(sigOut, 0)
1704 } 1704 }