From 82fa3ad12412be02bdbaca0ad8af963e9a843cc8 Mon Sep 17 00:00:00 2001 From: tb Date: Sat, 25 Mar 2023 09:17:14 +0000 Subject: [PATCH] Remove dead/unreachable code A copy-paste error would have resulted in a modified msg in case ctLen == 0 or msgLen == 0. So obviously this is unreachable code. --- regress/lib/libcrypto/wycheproof/wycheproof.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/regress/lib/libcrypto/wycheproof/wycheproof.go b/regress/lib/libcrypto/wycheproof/wycheproof.go index 7183e1bbe90..1213f5ee0e0 100644 --- a/regress/lib/libcrypto/wycheproof/wycheproof.go +++ b/regress/lib/libcrypto/wycheproof/wycheproof.go @@ -1,4 +1,4 @@ -/* $OpenBSD: wycheproof.go,v 1.139 2023/03/11 14:27:37 jsing Exp $ */ +/* $OpenBSD: wycheproof.go,v 1.140 2023/03/25 09:17:14 tb Exp $ */ /* * Copyright (c) 2018 Joel Sing * Copyright (c) 2018,2019,2022 Theo Buehler @@ -1254,12 +1254,6 @@ func runChaCha20Poly1305Test(algorithm string, wt *wycheproofTestAead) bool { if msgLen == 0 { msg = append(msg, 0) } - if ctLen == 0 { - msg = append(ct, 0) - } - if tagLen == 0 { - msg = append(tag, 0) - } ctx := C.EVP_AEAD_CTX_new() if ctx == nil { -- 2.20.1