]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordjm@openbsd.org <djm@openbsd.org>
Thu, 1 Jun 2017 06:59:21 +0000 (06:59 +0000)
committerDamien Miller <djm@mindrot.org>
Wed, 7 Jun 2017 01:31:15 +0000 (11:31 +1000)
no need to bzero allocated space now that we use use
recallocarray; ok deraadt@

Upstream-ID: 53333c62ccf97de60b8cb570608c1ba5ca5803c8

bitmap.c

index e8320d8c082eaf62643441a8eb915d4598ff6f93..5089b04070e72dbead6e7cfaa521ac3a90b7c445 100644 (file)
--- a/bitmap.c
+++ b/bitmap.c
@@ -87,10 +87,10 @@ reserve(struct bitmap *b, u_int n)
                return -1; /* invalid */
        nlen = (n / BITMAP_BITS) + 1;
        if (b->len < nlen) {
-               if ((tmp = recallocarray(b->d, b->len, nlen, BITMAP_BYTES)) == NULL)
+               if ((tmp = recallocarray(b->d, b->len,
+                   nlen, BITMAP_BYTES)) == NULL)
                        return -1;
                b->d = tmp;
-               memset(b->d + b->len, 0, (nlen - b->len) * BITMAP_BYTES);
                b->len = nlen;
        }
        return 0;