From fbd99b145c3e1b3890ff1dbdb20b91f631b3e85b Mon Sep 17 00:00:00 2001 From: "Bruce A. Mah" Date: Mon, 22 Apr 2024 16:13:19 -0700 Subject: [PATCH] Treat a decryption error as an empty string. --- src/iperf_auth.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/iperf_auth.c b/src/iperf_auth.c index 398e7d76b..72e85fc9a 100644 --- a/src/iperf_auth.c +++ b/src/iperf_auth.c @@ -336,8 +336,9 @@ int decrypt_rsa_message(const unsigned char *encryptedtext, const int encryptedt OPENSSL_free(rsa_buffer); BIO_free(bioBuff); - if (plaintext_len <= 0) { - goto errreturn; + /* Treat a decryption error as an empty string. */ + if (plaintext_len < 0) { + plaintext_len = 0; } return plaintext_len;