search for: recallocarray

Displaying 1 result from an estimated 1 matches for "recallocarray".

Did you mean: reallocarray
2024 Feb 03
1
a little note on sshbuf_reset()
...*buf) { u_char *d; if (buf->readonly || buf->refcount > 1) { /* Nonsensical. Just make buffer appear empty */ buf->off = buf->size; return; } if (sshbuf_check_sanity(buf) != 0) return; buf->off = buf->size = 0; if (buf->alloc != SSHBUF_SIZE_INIT) { if ((d = recallocarray(buf->d, buf->alloc, SSHBUF_SIZE_INIT, 1)) != NULL) { buf->cd = buf->d = d; buf->alloc = SSHBUF_SIZE_INIT; } } explicit_bzero(buf->d, buf->alloc); } This function allocates a new buffer of size SSHBUF_SIZE_INIT if buf->alloc != SSHBUF_SIZE_INIT, which can put...