upstream commit
no need to bzero allocated space now that we use use
recallocarray; ok deraadt@
Upstream-ID: 53333c62ccf97de60b8cb570608c1ba5ca5803c8
diff --git a/bitmap.c b/bitmap.c
index e8320d8..5089b04 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -87,10 +87,10 @@
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;