mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-30 13:01:23 +03:00
dh: Use calloc() instead of malloc()
This commit is contained in:
2
src/dh.c
2
src/dh.c
@@ -973,7 +973,7 @@ int ssh_get_pubkey_hash(ssh_session session, unsigned char **hash) {
|
|||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
h = malloc(sizeof(unsigned char) * MD5_DIGEST_LEN);
|
h = calloc(MD5_DIGEST_LEN, sizeof(unsigned char));
|
||||||
if (h == NULL) {
|
if (h == NULL) {
|
||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user