MFH (r292408): use correct length in calloc() call

This commit is contained in:
des 2016-01-16 20:07:01 +00:00
parent 5e1cc08a89
commit 94a89cd8e8

View File

@ -147,7 +147,7 @@ ssh_digest_start(int alg)
const struct ssh_digest *digest = ssh_digest_by_alg(alg);
struct ssh_digest_ctx *ret;
if (digest == NULL || (ret = calloc(1, sizeof(ret))) == NULL)
if (digest == NULL || (ret = calloc(1, sizeof(*ret))) == NULL)
return NULL;
if ((ret->mdctx = calloc(1, digest->ctx_len)) == NULL) {
free(ret);