34 lines
930 B
Diff
34 lines
930 B
Diff
From c68a58575b6d0520e342cb3d3796a8fecd66405d Mon Sep 17 00:00:00 2001
|
|
From: Norbert Pocs <npocs@redhat.com>
|
|
Date: Mon, 24 Apr 2023 11:55:59 +0200
|
|
Subject: [PATCH] CVE-2023-2283:pki_crypto: Remove unnecessary NULL check
|
|
|
|
Signed-off-by: Norbert Pocs <npocs@redhat.com>
|
|
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
|
|
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
|
|
|
|
Conflict:NA
|
|
Reference:https://gitlab.com/libssh/libssh-mirror/commit/c68a58575b6d0520e342cb3d3796a8fecd66405d
|
|
---
|
|
src/pki_crypto.c | 4 +---
|
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
|
|
|
diff --git a/src/pki_crypto.c b/src/pki_crypto.c
|
|
index d17ae6a..4b85af6 100644
|
|
--- a/src/pki_crypto.c
|
|
+++ b/src/pki_crypto.c
|
|
@@ -3264,9 +3264,7 @@ int pki_verify_data_signature(ssh_signature signature,
|
|
rc = SSH_OK;
|
|
|
|
out:
|
|
- if (ctx != NULL) {
|
|
- EVP_MD_CTX_free(ctx);
|
|
- }
|
|
+ EVP_MD_CTX_free(ctx);
|
|
EVP_PKEY_free(pkey);
|
|
return rc;
|
|
}
|
|
--
|
|
2.23.0
|
|
|