1
0
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:
Andreas Schneider
2018-01-18 18:57:18 +01:00
parent d7c47f529f
commit 43bd7b6eee

View File

@@ -973,7 +973,7 @@ int ssh_get_pubkey_hash(ssh_session session, unsigned char **hash) {
return SSH_ERROR;
}
h = malloc(sizeof(unsigned char) * MD5_DIGEST_LEN);
h = calloc(MD5_DIGEST_LEN, sizeof(unsigned char));
if (h == NULL) {
return SSH_ERROR;
}