Author: des
Date: Mon Oct  3 08:15:58 2016
New Revision: 306623
URL: https://svnweb.freebsd.org/changeset/base/306623

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

Modified:
  stable/9/crypto/openssh/digest-libc.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/crypto/openssh/   (props changed)

Modified: stable/9/crypto/openssh/digest-libc.c
==============================================================================
--- stable/9/crypto/openssh/digest-libc.c       Mon Oct  3 04:00:30 2016        
(r306622)
+++ stable/9/crypto/openssh/digest-libc.c       Mon Oct  3 08:15:58 2016        
(r306623)
@@ -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);
_______________________________________________
svn-src-stable-9@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"

Reply via email to