mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 12:50:30 +09:00
pki: Fix possible information leak via uninitialized stack buffer
Fixes T190
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 178b53f924)
This commit is contained in:
@@ -440,9 +440,9 @@ static int pki_private_key_encrypt(ssh_buffer privkey_buffer,
|
||||
{
|
||||
struct ssh_cipher_struct *ciphers = ssh_get_ciphertab();
|
||||
struct ssh_cipher_struct cipher;
|
||||
uint8_t key_material[128];
|
||||
uint8_t key_material[128] = {0};
|
||||
size_t key_material_len;
|
||||
char passphrase_buffer[128];
|
||||
char passphrase_buffer[128] = {0};
|
||||
int rc;
|
||||
int i;
|
||||
int cmp;
|
||||
|
||||
Reference in New Issue
Block a user