mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
CVE-2025-4878 legacy: Properly check return value to avoid NULL pointer dereference
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
697650caa9
commit
b35ee876ad
@@ -441,7 +441,7 @@ ssh_private_key privatekey_from_file(ssh_session session,
|
||||
auth_fn,
|
||||
auth_data,
|
||||
&key);
|
||||
if (rc == SSH_ERROR) {
|
||||
if (rc != SSH_OK) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user