summaryrefslogtreecommitdiffstats
path: root/sshbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshbuf.c')
-rw-r--r--sshbuf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sshbuf.c b/sshbuf.c
index dbe0c919..9915e9af 100644
--- a/sshbuf.c
+++ b/sshbuf.c
@@ -134,7 +134,7 @@ sshbuf_fromb(struct sshbuf *buf)
void
sshbuf_init(struct sshbuf *ret)
{
- bzero(ret, sizeof(*ret));
+ explicit_bzero(ret, sizeof(*ret));
ret->alloc = SSHBUF_SIZE_INIT;
ret->max_size = SSHBUF_SIZE_MAX;
ret->readonly = 0;
@@ -180,7 +180,7 @@ sshbuf_free(struct sshbuf *buf)
bzero(buf->d, buf->alloc);
free(buf->d);
}
- bzero(buf, sizeof(*buf));
+ explicit_bzero(buf, sizeof(*buf));
if (!dont_free)
free(buf);
}
@@ -196,7 +196,7 @@ sshbuf_reset(struct sshbuf *buf)
return;
}
if (sshbuf_check_sanity(buf) == 0)
- bzero(buf->d, buf->alloc);
+ explicit_bzero(buf->d, buf->alloc);
buf->off = buf->size = 0;
if (buf->alloc != SSHBUF_SIZE_INIT) {
if ((d = realloc(buf->d, SSHBUF_SIZE_INIT)) != NULL) {
@@ -255,7 +255,7 @@ sshbuf_set_max_size(struct sshbuf *buf, size_t max_size)
rlen = roundup(buf->size, SSHBUF_SIZE_INC);
if (rlen > max_size)
rlen = max_size;
- bzero(buf->d + buf->size, buf->alloc - buf->size);
+ explicit_bzero(buf->d + buf->size, buf->alloc - buf->size);
SSHBUF_DBG(("new alloc = %zu", rlen));
if ((dp = realloc(buf->d, rlen)) == NULL)
return SSH_ERR_ALLOC_FAIL;