mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
SSH-01-006: Add missing NULL checks in pki_signature_from_rsa_blob()
Fixes T193
Signed-off-by: Andreas Schneider <asn@cryptomilk.org
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 7b9cbcebe5)
This commit is contained in:
@@ -1614,6 +1614,10 @@ static int pki_signature_from_rsa_blob(const ssh_key pubkey,
|
||||
blob_padded_data = (char *) ssh_string_data(sig_blob_padded);
|
||||
blob_orig = (char *) ssh_string_data(sig_blob);
|
||||
|
||||
if (blob_padded_data == NULL || blob_orig == NULL) {
|
||||
goto errout;
|
||||
}
|
||||
|
||||
/* front-pad the buffer with zeroes */
|
||||
explicit_bzero(blob_padded_data, pad_len);
|
||||
/* fill the rest with the actual signature blob */
|
||||
|
||||
Reference in New Issue
Block a user