mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +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
7501ca1e08
commit
8dc29f140b
@@ -441,7 +441,7 @@ ssh_private_key privatekey_from_file(ssh_session session,
|
|||||||
auth_fn,
|
auth_fn,
|
||||||
auth_data,
|
auth_data,
|
||||||
&key);
|
&key);
|
||||||
if (rc == SSH_ERROR) {
|
if (rc != SSH_OK) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user