summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/bitmap.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2017-06-01 06:59:21 +0000
committerdjm <djm@openbsd.org>2017-06-01 06:59:21 +0000
commitbea1fb3c51fd492f016d45ed332a38b9340930de (patch)
tree0f8eb7632aa4286c867201be4c164aec0352e3fe /usr.bin/ssh/bitmap.c
parentunconditionally zero init size of buffer; ok markus@ deraadt@ (diff)
downloadwireguard-openbsd-bea1fb3c51fd492f016d45ed332a38b9340930de.tar.xz
wireguard-openbsd-bea1fb3c51fd492f016d45ed332a38b9340930de.zip
no need to bzero allocated space now that we use use recallocarray;
ok deraadt@
Diffstat (limited to 'usr.bin/ssh/bitmap.c')
-rw-r--r--usr.bin/ssh/bitmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/bitmap.c b/usr.bin/ssh/bitmap.c
index 8315b95b246..d16545dce78 100644
--- a/usr.bin/ssh/bitmap.c
+++ b/usr.bin/ssh/bitmap.c
@@ -85,10 +85,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;