artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
327b1c6
)
no need to bzero allocated space now that we use use recallocarray;
author
djm
<djm@openbsd.org>
Thu, 1 Jun 2017 06:59:21 +0000
(06:59 +0000)
committer
djm
<djm@openbsd.org>
Thu, 1 Jun 2017 06:59:21 +0000
(06:59 +0000)
ok deraadt@
usr.bin/ssh/bitmap.c
patch
|
blob
|
history
diff --git
a/usr.bin/ssh/bitmap.c
b/usr.bin/ssh/bitmap.c
index
8315b95
..
d16545d
100644
(file)
--- 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;