aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-01-18 18:57:18 +0100
committerAndreas Schneider <asn@cryptomilk.org>2018-01-18 18:57:18 +0100
commit43bd7b6eeee839ce1bdec19454cf02b804e467b6 (patch)
treee21e3137e70cb62e67e8bfc0cae1ddf91a4ef294
parentd7c47f529f2f5d6d032fc279c7fe078745e0ac44 (diff)
downloadlibssh-43bd7b6eeee839ce1bdec19454cf02b804e467b6.tar.gz
libssh-43bd7b6eeee839ce1bdec19454cf02b804e467b6.tar.xz
libssh-43bd7b6eeee839ce1bdec19454cf02b804e467b6.zip
dh: Use calloc() instead of malloc()
-rw-r--r--src/dh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dh.c b/src/dh.c
index 31b8baec..26e47994 100644
--- a/src/dh.c
+++ b/src/dh.c
@@ -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;
}