mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-05-31 16:21:13 +03:00
packet_crypt: Make sure we always operate on initilized memory
Found by MemorySanitizer. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
parent
932102bd13
commit
d598e4e52a
@ -150,7 +150,7 @@ unsigned char *ssh_packet_encrypt(ssh_session session, void *data, uint32_t len)
|
|||||||
" on at least one blocksize (received %d)", len);
|
" on at least one blocksize (received %d)", len);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
out = malloc(len);
|
out = calloc(1, len);
|
||||||
if (out == NULL) {
|
if (out == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user