During the LibreSSL audit an old concern resurfaced -- integer
overflow in the parameters of malloc(a*b), specifically.  The OpenSSH
hole of 2002 was due to the lack of overflow checking.  Here is a
summary of the problem, written in 2006:

    http://undeadly.org/cgi?action=article&sid=20060330071917

Way back then, we not only fixed the specific problem in some places,
but also extended calloc() to do a range check.  Other systems have
followed and now do the same.  But in general, it has always been hard
to swallow the cost of zero'ing memory in exchange for the range
check... so the mainstream advice is still that developers should put
a range check in place by hand.

In practice, such range checks are rare to non-existant.  That is
because the practice of placing them everywhere is DIFFICULT.

So in April I introduced mallocarray() to libc.  Within a few hours
Ted and I had hashed out and changed it to reallocarray() because
realloc callpoints needed it equally.

http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/calloc.3?query=reallocarray

Executive summary:

Our userland now contains 559 uses of this integer-overflow checking
API.  In some cases, "fail fast" xreallocarray idioms are built on top
of it, locally inside each program, following common practice.  Other
code refactorings occured while doing this work, and often we were
able to improve the security of expressions other than a*b which could
also overflow.

To save anyone interested time, here is a snapshot of where the changes
land.

./bin/chio/parse.y:                     if ((newp = 
reallocarray(curchanger->drives,
./bin/csh/alloc.c:    if ((ptr = reallocarray(p, c, n)) == (ptr_t) 0) {
./bin/csh/csh.c:    blkp = blk = xreallocarray(NULL, 10, sizeof(Char *));
./bin/csh/dir.c:    Char **vec = xreallocarray(NULL, 2, sizeof(Char **));
./bin/csh/dir.c:        cwd = xreallocarray(NULL, len, sizeof(Char));
./bin/csh/dir.c:        dp = xreallocarray(NULL, (cwdlen + (p - cp) + 1), 
sizeof(Char));
./bin/csh/dir.c:                    p1 = newcp = xreallocarray(NULL,
./bin/csh/dir.c:                    p1 = newcp = xreallocarray(NULL, cc + (p1 - 
p),
./bin/csh/dir.c:                    p1 = newcp = xreallocarray(NULL,
./bin/csh/dir.c:                    p1 = newcp = xreallocarray(NULL, cc + (p1 - 
p), sizeof(Char));
./bin/csh/dol.c:                    np = xreallocarray(NULL, len, sizeof(Char));
./bin/csh/file.c:               items = xreallocarray(items, maxitems, 
sizeof(*items));
./bin/csh/file.c:           items[numitems] = xreallocarray(NULL, 
(Strlen(entry) + 1), sizeof(Char));
./bin/csh/func.c:    name = xreallocarray(NULL, maxi + 1, sizeof(Char));
./bin/csh/glob.c:    nv = vl = xreallocarray(NULL, size, sizeof(Char *));
./bin/csh/glob.c:                   nv = xreallocarray(nv, size, sizeof(Char 
*));
./bin/csh/glob.c:               nv = xreallocarray(nv, size, sizeof(Char *));
./bin/csh/glob.c:    nv = vl = xreallocarray(NULL, size, sizeof(Char *));
./bin/csh/glob.c:                   nv = xreallocarray(nv, size, sizeof(Char 
*));
./bin/csh/glob.c:               nv = xreallocarray(nv, size, sizeof(Char *));
./bin/csh/glob.c:    gargv = xreallocarray(NULL, gargsiz, sizeof(Char *));
./bin/csh/glob.c:    pargv = xreallocarray(NULL, pargsiz, sizeof(Char *));
./bin/csh/glob.c:       pargv = xreallocarray(pargv, pargsiz, sizeof(Char *));
./bin/csh/glob.c:    blk = xreallocarray(NULL, GLOBSPACE, sizeof(Char *));
./bin/csh/glob.c:       gargv = xreallocarray(gargv, gargsiz, sizeof(Char *));
./bin/csh/glob.c:    p = gargv[gargc - 1] = (Char *) xreallocarray(NULL, n, 
sizeof(Char));
./bin/csh/misc.c:    n = p = xreallocarray(NULL, (p - s), sizeof(char));
./bin/csh/misc.c:    ep = xreallocarray(NULL, ((p - cp) + (q - dp) - 1), 
sizeof(char));
./bin/csh/set.c:    Char **vec = xreallocarray(NULL, 2, sizeof(Char **));
./bin/csh/str.c:    sdst = dst = xreallocarray(NULL, n + 1, sizeof(Char *));
./bin/csh/str.c:    sdst = dst = xreallocarray(NULL, n + 1, sizeof(char *));
./bin/csh/str.c:        sdst = xreallocarray(NULL, dstsize, sizeof(Char));
./bin/csh/str.c:            sdst = xreallocarray(sdst, dstsize, sizeof(Char));
./bin/csh/str.c:        sdst = xreallocarray(NULL, dstsize, sizeof(char));
./bin/csh/str.c:            sdst = xreallocarray(sdst, dstsize, sizeof(char));
./bin/csh/str.c:    n = p = xreallocarray(NULL, p - s, sizeof(Char));
./bin/csh/str.c:    ep = xreallocarray(NULL, ((p - cp) + (q - dp) - 1), 
sizeof(Char));
./bin/csh/str.c:        sdst = xreallocarray(NULL, dstsize, sizeof(char));
./bin/csh/str.c:                sdst = xreallocarray(sdst, dstsize, 
sizeof(char));
./bin/csh/str.c:            sdst = xreallocarray(sdst, dstsize, sizeof(char));
./bin/csh/str.c:        sdst = xreallocarray(sdst, n, sizeof(char));
./bin/ed/glbl.c:                if ((ts = reallocarray(active_list,
./bin/ed/undo.c:            (t = reallocarray(ustack, (usize += USIZE), 
sizeof(undo_t))) != NULL) {
./bin/ls/print.c:               if ((a = reallocarray(array, dp->entries, 
sizeof(FTSENT *))) ==
./bin/pax/options.c:                            p = reallocarray(incfiles, n,
./bin/pax/tables.c:     if ((dirp = reallocarray(NULL, dirsize, 
sizeof(DIRDATA))) == NULL) {
./bin/pax/tables.c:             dblk = reallocarray(dirp, dirsize, 2 * 
sizeof(DIRDATA));
./bin/ps/ps.c:  if ((kinfo = reallocarray(NULL, nentries, sizeof(*kinfo))) == 
NULL)
./bin/systrace/systrace.c:              args = reallocarray(NULL, argc + 1, 
sizeof(char *));
./games/boggle/boggle/bog.c:                                    pword = 
reallocarray(pword, maxpwords,
./games/boggle/boggle/bog.c:                    mword = reallocarray(mword, 
maxmwords, sizeof(char *));
./games/fortune/strfile/strfile.c:                              ptr = 
reallocarray(ptr, \
./games/hunt/hunt/list.c:                       drivers = reallocarray(drivers, 
maxdrivers,
./lib/libc/gen/fts.c:           if ((a = reallocarray(sp->fts_array,
./lib/libc/gen/getnetgrent.c:           slstr = reallocarray(sl->sl_str, 
sl->sl_max, sizeof(char *));
./lib/libc/gen/glob.c:  pathv = reallocarray(pglob->gl_pathv, newn, 
sizeof(*pathv));
./lib/libc/gen/glob.c:          statv = reallocarray(pglob->gl_statv, newn, 
sizeof(*statv));
./lib/libc/gen/scandir.c:                       nnames = reallocarray(names,
./lib/libc/gen/setmode.c:               newset = reallocarray(saveset, setlen, 
sizeof(BITCMD)); \
./lib/libc/gen/vis.c:   buf = reallocarray(NULL, 4, strlen(src) + 1);
./lib/libc/net/getprotoent.c:                           p = 
reallocarray(pe->p_aliases,
./lib/libc/net/getservent.c:                    p = reallocarray(se->s_aliases, 
sd->maxaliases,
./lib/libc/regex/engine.c:                      m->pmatch = reallocarray(NULL, 
m->g->nsub + 1,
./lib/libc/regex/engine.c:                              m->lastpos = 
reallocarray(NULL,
./lib/libc/regex/regcomp.c:     p->strip = reallocarray(NULL, p->ssize, 
sizeof(sop));
./lib/libc/regex/regcomp.c:             ptr = reallocarray(p->g->sets, nc, 
sizeof(cset));
./lib/libc/regex/regcomp.c:             ptr = reallocarray(p->g->setbits, nc / 
CHAR_BIT, css);
./lib/libc/regex/regcomp.c:     sp = reallocarray(p->strip, size, sizeof(sop));
./lib/libc/regex/regcomp.c:     g->strip = reallocarray(p->strip, p->slen, 
sizeof(sop));
./lib/libc/regex/regexec.c:#define      STATESETUP(m, nv)       { (m)->space = 
reallocarray(NULL,           \
./lib/libc/rpc/svc.c:           pfd = reallocarray(svc_pollfd, new_size, 
sizeof(*svc_pollfd));
./lib/libc/rpc/svc_run.c:                       newp = reallocarray(pfd, 
svc_max_pollfd, sizeof(*pfd));
./lib/libc/stdio/open_wmemstream.c:             p = reallocarray(st->string, 
sz, sizeof(wchar_t));
./lib/libc/stdio/ungetc.c:      p = reallocarray(_UB(fp)._base, i, 2);
./lib/libc/stdlib/malloc.3:if ((p = reallocarray(NULL, num, size)) == NULL)
./lib/libc/stdlib/malloc.3:if ((newp = reallocarray(p, num, size)) == NULL) {
./lib/libc/stdlib/malloc.3:if ((p = reallocarray(NULL, num, size)) == NULL)
./lib/libc/stdlib/setenv.c:     P = reallocarray(lastenv, cnt + 2, sizeof(char 
*));
./lib/libc/stdlib/setenv.c:             P = reallocarray(lastenv, cnt + 2, 
sizeof(char *));
./lib/libc/string/wcsdup.c:     copy = reallocarray(NULL, len, sizeof(wchar_t));
./lib/libedit/chared.c: el->el_line.buffer = reallocarray(NULL, EL_BUFSIZ,
./lib/libedit/chared.c: el->el_chared.c_undo.buf = reallocarray(NULL, EL_BUFSIZ,
./lib/libedit/chared.c: el->el_chared.c_redo.buf = reallocarray(NULL, EL_BUFSIZ,
./lib/libedit/chared.c: el->el_chared.c_kill.buf = reallocarray(NULL, EL_BUFSIZ,
./lib/libedit/chared.c: ma->macro = reallocarray(NULL, EL_MAXMACRO,
./lib/libedit/chared.c: newbuffer = reallocarray(el->el_line.buffer, newsz,
./lib/libedit/chared.c: newbuffer = reallocarray(el->el_chared.c_kill.buf, 
newsz,
./lib/libedit/chared.c: newbuffer = reallocarray(el->el_chared.c_undo.buf,
./lib/libedit/chared.c: newbuffer = reallocarray(el->el_chared.c_redo.buf,
./lib/libedit/chartype.c:               p = reallocarray(conv->cbuff, 
conv->csize, sizeof(char));
./lib/libedit/chartype.c:               p = reallocarray(conv->wbuff, 
conv->wsize, sizeof(Char));
./lib/libedit/chartype.c:       wargv = reallocarray(NULL, argc, 
sizeof(*wargv));
./lib/libedit/chartype.c:           buff = reallocarray(NULL, buffsize, 
sizeof(*buff));
./lib/libedit/chartype.c:                       p = reallocarray(buff, 
buffsize, sizeof(*buff));
./lib/libedit/chartype.c:               p = reallocarray(buff, buffsize, 
sizeof(*buff));
./lib/libedit/filecomplete.c:                   nmatch_list = 
reallocarray(match_list,
./lib/libedit/filecomplete.c:   temp = reallocarray(NULL, len + 1, 
sizeof(*temp));
./lib/libedit/hist.c:   el->el_history.buf = reallocarray(NULL, EL_BUFSIZ,
./lib/libedit/hist.c:   newbuf = reallocarray(el->el_history.buf, newsz, 
sizeof(*newbuf));
./lib/libedit/history.c:        s = reallocarray(NULL, len, sizeof(*s));
./lib/libedit/key.c:    el->el_key.buf = reallocarray(NULL, KEY_BUFSIZ,
./lib/libedit/map.c:    el->el_map.alt = reallocarray(NULL, N_KEYS, 
sizeof(el_action_t));
./lib/libedit/map.c:    el->el_map.key = reallocarray(NULL, N_KEYS, 
sizeof(el_action_t));
./lib/libedit/map.c:    el->el_map.help = reallocarray(NULL, EL_NUM_FCNS,
./lib/libedit/map.c:    el->el_map.func = reallocarray(NULL, EL_NUM_FCNS,
./lib/libedit/map.c:    if ((p = reallocarray(el->el_map.func, nf, 
sizeof(el_func_t))) == NULL)
./lib/libedit/map.c:    if ((p = reallocarray(el->el_map.help, nf, 
sizeof(el_bindings_t)))
./lib/libedit/parse.c:          tprog = reallocarray(NULL, l + 1, 
sizeof(*tprog));
./lib/libedit/readline.c:                                               nwhat = 
reallocarray(what,
./lib/libedit/readline.c:                       nresult = reallocarray(result, 
size,
./lib/libedit/readline.c:       if ((list = reallocarray(NULL, max, 
sizeof(*list))) == NULL)
./lib/libedit/readline.c:                       if ((nl = reallocarray(list, 
max, sizeof(*nl))) == NULL)
./lib/libedit/search.c: el->el_search.patbuf = reallocarray(NULL, EL_BUFSIZ,
./lib/libedit/term.c:   el->el_term.t_fkey = reallocarray(NULL, A_K_NKEYS, 
sizeof(fkey_t));
./lib/libedit/term.c:   el->el_term.t_str = reallocarray(NULL, T_str, 
sizeof(char *));
./lib/libedit/term.c:   el->el_term.t_val = reallocarray(NULL, T_val, 
sizeof(int));
./lib/libedit/term.c:   b = reallocarray(NULL, c->v + 1, sizeof(*b));
./lib/libedit/term.c:           b[i] = reallocarray(NULL, c->h + 1, 
sizeof(**b));
./lib/libedit/term.c:   b = reallocarray(NULL, c->v + 1, sizeof(*b));
./lib/libedit/term.c:           b[i] = reallocarray(NULL, c->h + 1, 
sizeof(**b));
./lib/libedit/tokenizer.c:      tok->argv = reallocarray(NULL, tok->amax, 
sizeof(*tok->argv));
./lib/libedit/tokenizer.c:      tok->wspace = reallocarray(NULL, WINCR, 
sizeof(*tok->wspace));
./lib/libedit/tokenizer.c:                      Char *s = 
reallocarray(tok->wspace, size, sizeof(*s));
./lib/libedit/tokenizer.c:                      p = reallocarray(tok->argv, 
tok->amax, sizeof(*p));
./lib/libedit/vi.c:     line = reallocarray(NULL, len, sizeof(*line));
./lib/libevent/kqueue.c:                newchange = reallocarray(kqop->changes,
./lib/libevent/kqueue.c:                newresult = reallocarray(kqop->events,
./lib/libevent/poll.c:          tmp_event_set = reallocarray(pop->event_set,
./lib/libevent/poll.c:          tmp_event_r_back = 
reallocarray(pop->event_r_back,
./lib/libevent/poll.c:          tmp_event_w_back = 
reallocarray(pop->event_w_back,
./lib/libevent/poll.c:          tmp_idxplus1_by_fd = 
reallocarray(pop->idxplus1_by_fd,
./lib/libevent/select.c:        if ((r_by_fd = reallocarray(sop->event_r_by_fd, 
n_events,
./lib/libevent/select.c:        if ((w_by_fd = reallocarray(sop->event_w_by_fd, 
n_events,
./lib/libevent/signal.c:                p = reallocarray(sig->sh_old, new_max, 
sizeof(*sig->sh_old));
./lib/libfuse/fuse_opt.c:       av = reallocarray(args->argv, args->argc + 1, 
sizeof(*av));
./lib/libkeynote/environment.c:             tempbuf = reallocarray(buf, bufsize,
./lib/libkvm/kvm_file2.c:       where = _kvm_reallocarray(kd, NULL, nfiles, 
esize);
./lib/libkvm/kvm_file2.c:       where = _kvm_reallocarray(kd, NULL, nfiles + 
10, esize);
./lib/libkvm/kvm_file2.c:                       char *tmp = 
reallocarray(filebuf,
./lib/libkvm/kvm_proc.c:        void *np = reallocarray(p, i, n);
./lib/libkvm/kvm_proc.c:                kd->argv = _kvm_reallocarray(kd, NULL, 
kd->argc,
./lib/libkvm/kvm_proc.c:                kd->argv = (char 
**)_kvm_reallocarray(kd, kd->argv, kd->argc,
./lib/libkvm/kvm_proc.c:                        newp = _kvm_reallocarray(kd, 
kd->argspc,
./lib/libkvm/kvm_proc.c:                buf = _kvm_reallocarray(kd, kd->argbuf, 
orglen, 2);
./lib/libkvm/kvm_proc2.c:               kd->procbase = _kvm_reallocarray(kd, 
NULL, maxthread, esize);
./lib/libocurses/newwin.c:      if ((win->lines = reallocarray(NULL, nl, 
sizeof(__LINE *))) == NULL) {
./lib/libocurses/newwin.c:      if ((win->lspace = reallocarray(NULL, nl, 
sizeof(__LINE))) == NULL) {
./lib/libocurses/newwin.c:              if ((win->wspace = reallocarray(NULL, 
nc,
./lib/libpcap/optimize.c:       blocks = reallocarray(NULL, n, sizeof(*blocks));
./lib/libpcap/optimize.c:       edges = reallocarray(NULL, n_edges, 
sizeof(*edges));
./lib/libpcap/optimize.c:       levels = reallocarray(NULL, n_blocks, 
sizeof(*levels));
./lib/libpcap/optimize.c:       vmap = reallocarray(NULL, maxval, 
sizeof(*vmap));
./lib/libpcap/optimize.c:       vnode_base = reallocarray(NULL, maxval, 
sizeof(*vmap));
./lib/libpcap/pcap-bpf.c:               p->fcode.bf_insns = reallocarray(NULL,
./lib/libpcap/pcap.c:           *dlt_buffer = reallocarray(NULL, 
sizeof(**dlt_buffer),
./lib/libssl/src/crypto/ex_data.c:              storage = reallocarray(NULL, 
mx, sizeof(CRYPTO_EX_DATA_FUNCS*));
./lib/libssl/src/crypto/ex_data.c:              storage = reallocarray(NULL, 
mx, sizeof(CRYPTO_EX_DATA_FUNCS*));
./lib/libssl/src/crypto/ex_data.c:              storage = reallocarray(NULL, 
mx, sizeof(CRYPTO_EX_DATA_FUNCS*));
./lib/libssl/src/crypto/asn1/a_set.c:   rgSetBlob = reallocarray(NULL, 
sk_OPENSSL_BLOCK_num(a), sizeof(MYBLOB));
./lib/libssl/src/crypto/asn1/tasn_enc.c:                        derlst = 
reallocarray(NULL, sk_ASN1_VALUE_num(sk),
./lib/libssl/src/crypto/bn/bn_asm.c:    tp = reallocarray(NULL, num + 2, 
sizeof(BN_ULONG));
./lib/libssl/src/crypto/bn/bn_ctx.c:            unsigned int *newitems = 
reallocarray(NULL,
./lib/libssl/src/crypto/bn/bn_gf2m.c:   if ((arr = reallocarray(NULL, max, 
sizeof(int))) == NULL)
./lib/libssl/src/crypto/bn/bn_gf2m.c:   if ((arr = reallocarray(NULL, max, 
sizeof(int))) == NULL)
./lib/libssl/src/crypto/bn/bn_gf2m.c:   if ((arr = reallocarray(NULL, max, 
sizeof(int))) == NULL)
./lib/libssl/src/crypto/bn/bn_gf2m.c:   if ((arr = reallocarray(NULL, max, 
sizeof(int))) == NULL)
./lib/libssl/src/crypto/bn/bn_gf2m.c:   if ((arr = reallocarray(NULL, max, 
sizeof(int))) == NULL)
./lib/libssl/src/crypto/bn/bn_lib.c:    a = A = reallocarray(NULL, words, 
sizeof(BN_ULONG));
./lib/libssl/src/crypto/bn/bn_print.c:  bn_data = reallocarray(NULL, num / 
BN_DEC_NUM + 1, sizeof(BN_ULONG));
./lib/libssl/src/crypto/ec/ec_mult.c:   wNAF = reallocarray(NULL, (totalnum + 
1), sizeof wNAF[0]);
./lib/libssl/src/crypto/ec/ec_mult.c:   wsize = reallocarray(NULL, totalnum, 
sizeof wsize[0]);
./lib/libssl/src/crypto/ec/ec_mult.c:   wNAF_len = reallocarray(NULL, totalnum, 
sizeof wNAF_len[0]);
./lib/libssl/src/crypto/ec/ec_mult.c:   val_sub = reallocarray(NULL, totalnum, 
sizeof val_sub[0]);
./lib/libssl/src/crypto/ec/ec_mult.c:   val = reallocarray(NULL, (num_val + 1), 
sizeof val[0]);
./lib/libssl/src/crypto/ec/ec_mult.c:   points = reallocarray(NULL, (num + 1), 
sizeof(EC_POINT *));
./lib/libssl/src/crypto/ec/ec_print.c:  ret = reallocarray(NULL, buf_len + 1, 
2);
./lib/libssl/src/crypto/ec/ecp_nistp224.c:                      tmp_felems = 
reallocarray(NULL,
./lib/libssl/src/crypto/ec/ecp_nistp256.c:                      tmp_smallfelems 
= reallocarray(NULL,
./lib/libssl/src/crypto/ec/ecp_nistp521.c:                      tmp_felems = 
reallocarray(NULL,
./lib/libssl/src/crypto/ec/ecp_smpl.c:  heap = reallocarray(NULL, pow2, sizeof 
heap[0]);
./lib/libssl/src/crypto/engine/eng_rsax.c:              hptr = 
reallocarray(NULL, 3, sizeof(E_RSAX_MOD_CTX));
./lib/libssl/src/crypto/lhash/lhash.c:  if ((ret->b = reallocarray(NULL, 
MIN_NODES, sizeof(LHASH_NODE *))) == NULL)
./lib/libssl/src/crypto/lhash/lhash.c:          n = reallocarray(lh->b, j, 
sizeof(LHASH_NODE *));
./lib/libssl/src/crypto/lhash/lhash.c:          n = reallocarray(lh->b, 
lh->pmax, sizeof(LHASH_NODE *));
./lib/libssl/src/crypto/objects/o_names.c:      d.names = reallocarray(NULL, 
lh_OBJ_NAME_num_items(names_lh),
./lib/libssl/src/crypto/objects/obj_xref.c:     ntr = reallocarray(NULL, 3, 
sizeof(int));
./lib/libssl/src/crypto/pem/pem_lib.c:  buf = reallocarray(NULL, PEM_BUFSIZE, 
8);
./lib/libssl/src/crypto/pem/pem_seal.c: s = reallocarray(NULL, max, 2);
./lib/libssl/src/crypto/pem/pem_seal.c: s = reallocarray(NULL, i, 2);
./lib/libssl/src/crypto/stack/stack.c:  s = reallocarray(ret->data, 
sk->num_alloc, sizeof(char *));
./lib/libssl/src/crypto/stack/stack.c:  if ((ret->data = reallocarray(NULL, 
MIN_NODES, sizeof(char *))) == NULL)
./lib/libssl/src/crypto/stack/stack.c:          s = reallocarray(st->data, 
st->num_alloc, 2 * sizeof(char *));
./lib/libssl/src/crypto/txt_db/txt_db.c:        if ((ret->index = 
reallocarray(NULL, num, sizeof(*ret->index))) == NULL)
./lib/libssl/src/crypto/txt_db/txt_db.c:        if ((ret->qual = 
reallocarray(NULL, num, sizeof(*(ret->qual)))) == NULL)
./lib/libssl/src/crypto/x509/x509spki.c:        b64_str = reallocarray(NULL, 
der_len, 2);
./lib/libssl/src/ssl/s3_enc.c:  if ((key_block = reallocarray(NULL, mac_len + 
key_len + iv_len, 2))
./lib/libssl/src/ssl/ssl_ciph.c:        co_list = reallocarray(NULL, 
num_of_ciphers, sizeof(CIPHER_ORDER));
./lib/libssl/src/ssl/ssl_ciph.c:        ca_list = reallocarray(NULL, 
num_of_alias_max, sizeof(SSL_CIPHER *));
./lib/libssl/src/ssl/t1_enc.c:  if ((key_block = reallocarray(NULL, 
mac_secret_size + key_len + iv_len,
./lib/libssl/src/ssl/t1_lib.c:                          if ((formats = 
reallocarray(NULL, formatslen,
./lib/libssl/src/ssl/t1_lib.c:                          if ((curves = 
reallocarray(NULL, curveslen,
./lib/libssl/src/ssl/t1_lib.c:                          if ((formats = 
reallocarray(NULL, formatslen,
./lib/libusbhid/usage.c:                                new = 
reallocarray(curpage->page_contents,
./lib/libusbhid/usage.c:                                        new = 
reallocarray(pages,
./libexec/ld.so/dl_prebind.c:                   objarray = 
_dl_reallocarray(NULL, i,
./libexec/ld.so/loader.c:                       liblist = 
_dl_reallocarray(NULL, libcount,
./libexec/ld.so/loader.c:                       randomlist =  
_dl_reallocarray(NULL, libcount,
./libexec/ld.so/ldconfig/prebind.c:                     hash = 
reallocarray(NULL, 2 + object->nbuckets
./libexec/ld.so/ldconfig/prebind.c:             pl->fixup[libidx] = 
reallocarray(pl->fixup[libidx],
./libexec/ld.so/ldconfig/prebind.c:             newarray = 
reallocarray(objarray, objarray_sz,
./libexec/ld.so/ldconfig/prebind_path.c:        return reallocarray(ptr, cnt, 
num);                                     
./libexec/ld.so/ldd/ldd.c:      if ((phdr = reallocarray(NULL, ehdr.e_phnum, 
sizeof(Elf_Phdr))) == NULL)
./libexec/login_yubikey/yubikey.c:      pp = wpassword = reallocarray(NULL, len 
+ 1, sizeof(wchar_t));
./libexec/rpc.rstatd/rstatd.c:                  newp = reallocarray(pfd, 
svc_max_pollfd, sizeof(*pfd));
./libexec/spamd/grey.c:                 tmp = reallocarray(whitelist,
./libexec/spamd/grey.c:                 tmp = reallocarray(traplist,
./libexec/spamd/grey.c:                 tmp = reallocarray(a, dbk.size, 2);
./libexec/spamd/sdl.c:          tmp = reallocarray(blacklists, blc + 128,
./libexec/spamd/sdl.c:                                  tmp = 
reallocarray(sdnew,
./libexec/spamd/spamd.c:                        tmp = reallocarray(av, ac + 
2048, sizeof(char *));
./libexec/spamd/x:                      tmp = reallocarray(av, ac + 2048, 
sizeof(char *));
./libexec/spamd-setup/spamd-setup.c:                    tmp = 
reallocarray(list, *cls + 32,
./libexec/spamd-setup/spamd-setup.c:            blt = reallocarray(bl, *bls, 
sizeof(struct bl));
./libexec/spamd-setup/spamd-setup.c:                    blt = reallocarray(bl, 
*bls, sizeof(struct bl));
./libexec/spamd-setup/spamd-setup.c:                            tmp = 
reallocarray(blists, bls,
./regress/lib/libcrypto/ec/ectest.c:    curves = reallocarray(NULL, 
sizeof(EC_builtin_curve),  crv_len);
./regress/lib/libcrypto/ecdsa/ecdsatest.c:      curves = reallocarray(NULL, 
sizeof(EC_builtin_curve), crv_len);
./regress/sys/ffs/fstest.c:     gidset = reallocarray(NULL, ngroups, 
sizeof(*gidset));
./sbin/disklabel/editor.c:      alloc = reallocarray(NULL, lastalloc, 
sizeof(struct space_allocation));
./sbin/dump/traverse.c:                 np = reallocarray(mybuf, seccount, 
secsize);
./sbin/fsck/fsck.c:     argv = ereallocarray(NULL, maxargc, sizeof(char *));
./sbin/fsck/fsck.c:                     argv = ereallocarray(argv, newmaxargc, 
sizeof(char *));
./sbin/fsck/fsutil.c:   newp = reallocarray(p, n, s);
./sbin/fsck_ext2fs/inode.c:             inpsort = reallocarray(inpsort, listmax,
./sbin/fsck_ffs/inode.c:                newinpsort = reallocarray(inpsort,
./sbin/fsck_ffs/pass1.c:                        ninfo = reallocarray(info, 
ninosused, sizeof(*ninfo));
./sbin/fsirand/fsirand.c:       if ((ib = reallocarray(inodebuf, 
sblock->fs_ipg, isize)) == NULL)
./sbin/iked/config.c:   if ((xform = reallocarray(prop->prop_xforms,
./sbin/iked/pfkey.c:            if ((data = reallocarray(NULL, hdr.sadb_msg_len,
./sbin/iked/pfkey.c:    if ((data = reallocarray(NULL, hdr.sadb_msg_len, 
PFKEYV2_CHUNK))
./sbin/isakmpd/ike_quick_mode.c:                                new_proposal = 
reallocarray(proposal,
./sbin/isakmpd/ike_quick_mode.c:                                
new_transforms_len = reallocarray(transforms_len,
./sbin/isakmpd/ike_quick_mode.c:                                new_transform = 
reallocarray(transform,
./sbin/isakmpd/ike_quick_mode.c:                                
new_transform_cnt = reallocarray(transform_cnt,
./sbin/isakmpd/ike_quick_mode.c:                                
new_transform_len = reallocarray(transform_len,
./sbin/isakmpd/ipsec.c:         new_contacts = reallocarray(contacts, cnt, 
sizeof contacts[0]);
./sbin/isakmpd/message.c:       new_iov = reallocarray(msg->iov, msg->iovlen + 
1,
./sbin/isakmpd/pf_key_v2.c:             buf = reallocarray(NULL, 
hdr.sadb_msg_len, PF_KEY_V2_CHUNK);
./sbin/isakmpd/sa.c:    new_tab = reallocarray(sa_tab, new_mask + 1, 
sizeof(struct sa_list));
./sbin/isakmpd/ui.c:            new_buf = reallocarray(buf, sz, 2);
./sbin/mount/mount.c:   if((argv = reallocarray(NULL, argvsize, sizeof(char 
*))) == NULL)
./sbin/mount/mount.c:   if ((av = typelist = reallocarray(NULL, i + 1, 
sizeof(char *))) == NULL)
./sbin/mountd/mountd.c:                 newp = reallocarray(pfd, 
svc_max_pollfd, sizeof(*pfd));
./sbin/ncheck_ffs/ncheck_ffs.c:         newicache = reallocarray(icache, 
maxicache, sizeof(*icache));
./sbin/ncheck_ffs/ncheck_ffs.c:             (itab = reallocarray(NULL, 
sblock->fs_ipg, dsize)) == NULL)
./sbin/ncheck_ffs/ncheck_ffs.c: newilist = reallocarray(ilist, ninodes + 1, 
sizeof(*ilist));
./sbin/ncheck_ffs/ncheck_ffs.c:                 if ((newbuf = reallocarray(buf, 
size, 2)) == NULL)
./sbin/pfctl/pfctl_radix.c:     p = reallocarray(b->pfrb_caddr, minsize, bs);
./sys/arch/hppa/stand/mkboot/mkboot.c:          elf_segments = 
reallocarray(NULL, header_count,
./sys/arch/hppa64/stand/mkboot/mkboot.c:                elf_segments = 
reallocarray(NULL, header_count,
./sys/dev/microcode/bwi/extract/extract.c:      if ((h = reallocarray(NULL, 
nfiles, sizeof(*h))) == NULL)
./usr.bin/at/at.c:                      newatjobs = reallocarray(atjobs, 
newjobs, sizeof(job));
./usr.bin/awk/b.c:                      setvec = reallocarray(setvec, maxsetvec,
./usr.bin/awk/b.c:                      tmpset = reallocarray(tmpset, maxsetvec,
./usr.bin/awk/b.c:                      setvec = reallocarray(setvec, maxsetvec,
./usr.bin/awk/b.c:                      tmpset = reallocarray(tmpset, maxsetvec,
./usr.bin/awk/b.c:              setvec = reallocarray(setvec, maxsetvec, 4 * 
sizeof(int));
./usr.bin/awk/b.c:              tmpset = reallocarray(tmpset, maxsetvec, 4 * 
sizeof(int));
./usr.bin/awk/b.c:                                              setvec = 
reallocarray(setvec,
./usr.bin/awk/b.c:                                              tmpset = 
reallocarray(tmpset,
./usr.bin/awk/run.c:            frame = reallocarray(frame, (nframe += 100),
./usr.bin/awk/run.c:            nf = reallocarray(files, nnf, sizeof(*nf));
./usr.bin/bc/bc.y:              p = reallocarray(instructions, newsize, 
sizeof(*p));
./usr.bin/bc/bc.y:      sargv = reallocarray(NULL, argc, sizeof(char *));
./usr.bin/col/col.c:                    l->l_line = xreallocarray(l->l_line,
./usr.bin/col/col.c:                    sorted = xreallocarray(sorted,
./usr.bin/col/col.c:                    count = xreallocarray(count,
./usr.bin/col/col.c:            l = xreallocarray(NULL, NALLOC, sizeof(LINE));
./usr.bin/col/col.c:    if (!(p = reallocarray(p, n, size)))
./usr.bin/column/column.c:      cols = ereallocarray(NULL, maxcols, sizeof(char 
*));
./usr.bin/column/column.c:                              cols = 
ereallocarray(cols, maxcols, 
./usr.bin/column/column.c:                              lens = 
ereallocarray(lens, maxcols,
./usr.bin/column/column.c:                      list = ereallocarray(list, 
maxentry, sizeof(char *));
./usr.bin/column/column.c:      if (!(p = reallocarray(oldp, sz1, sz2)))
./usr.bin/compress/main.c:                              nargv = 
reallocarray(nargv,
./usr.bin/cvs/buf.c:    b->cb_buf = xreallocarray(b->cb_buf, 1, b->cb_size + 
len);
./usr.bin/cvs/cvs.c:                    *cmd_argv = xreallocarray(*cmd_argv, 
cur,
./usr.bin/cvs/cvs.c:            *cmd_argv = xreallocarray(*cmd_argv, cur,
./usr.bin/cvs/diff3.c:          buf = xreallocarray(buf, 1, bufsize);
./usr.bin/cvs/diff3.c:  d13 = xreallocarray(d13, newsz, sizeof(*d13));
./usr.bin/cvs/diff3.c:  d23 = xreallocarray(d23, newsz, sizeof(*d23));
./usr.bin/cvs/diff3.c:  de = xreallocarray(de, newsz, sizeof(*de));
./usr.bin/cvs/diff3.c:  overlap = xreallocarray(overlap, newsz, 
sizeof(*overlap));
./usr.bin/cvs/diff_internals.c: member = xreallocarray(member, slen[1] + 2, 
sizeof(*member));
./usr.bin/cvs/diff_internals.c: class = xreallocarray(class, slen[0] + 2, 
sizeof(*class));
./usr.bin/cvs/diff_internals.c: J = xreallocarray(J, len[0] + 2, sizeof(*J));
./usr.bin/cvs/diff_internals.c: ixold = xreallocarray(ixold, len[0] + 2, 
sizeof(*ixold));
./usr.bin/cvs/diff_internals.c: ixnew = xreallocarray(ixnew, len[1] + 2, 
sizeof(*ixnew));
./usr.bin/cvs/diff_internals.c:                 p = xreallocarray(p, sz + 3, 
sizeof(*p));
./usr.bin/cvs/diff_internals.c:         clist = xreallocarray(clist, clistlen, 
sizeof(*clist));
./usr.bin/cvs/diff_internals.c:                 context_vec_start = 
xreallocarray(context_vec_start,
./usr.bin/cvs/getlog.c: dest = xreallocarray(dest, len, 1);
./usr.bin/cvs/rcsparse.c:       pdp->rp_buf = xreallocarray(pdp->rp_buf, 1,
./usr.bin/cvs/server.c: server_argv = xreallocarray(server_argv, server_argc + 
2,
./usr.bin/cvs/server.c: server_argv[idx] = xreallocarray(server_argv[idx], len, 
sizeof(char));
./usr.bin/cvs/util.c:           av->argv = xreallocarray(av->argv,
./usr.bin/dc/bcode.c:           stack = reallocarray(bmachine.readstack, newsz,
./usr.bin/dc/inout.c:                           p = breallocarray(p, 1, new_sz 
+ 1);
./usr.bin/dc/mem.c:     q = reallocarray(p, nmemb, size);
./usr.bin/dc/stack.c:           stack->stack = breallocarray(stack->stack,
./usr.bin/dc/stack.c:   array->data = breallocarray(array->data, newsize, 
sizeof(*array->data));
./usr.bin/diff3/diff3prog.c:    p = reallocarray(d13, newsz, sizeof(struct 
diff));
./usr.bin/diff3/diff3prog.c:    p = reallocarray(d23, newsz, sizeof(struct 
diff));
./usr.bin/diff3/diff3prog.c:    p = reallocarray(de, newsz, sizeof(struct 
diff));
./usr.bin/diff3/diff3prog.c:    q = reallocarray(overlap, newsz, sizeof(char));
./usr.bin/file/apprentice.c:    if ((*magicp = reallocarray(NULL, mentrycount, 
sizeof(**magicp))) == NULL) {
./usr.bin/file/apprentice.c:                    if ((nm = reallocarray(me->mp, 
cnt, sizeof(*nm))) 
./usr.bin/file/apprentice.c:                    if ((mp = 
reallocarray(*mentryp, maxmagic, 
./usr.bin/file/apprentice.c:                    if ((m = reallocarray(NULL, 
ALLOC_CHUNK, sizeof(*m))) == NULL) {
./usr.bin/file/magic.c: ms->c.li = reallocarray(NULL, ms->c.len, 
sizeof(*ms->c.li));
./usr.bin/find/function.c:              new->e_argv = ereallocarray(NULL,
./usr.bin/find/function.c:              new->e_argv = ereallocarray(NULL, cnt, 
sizeof(char *));
./usr.bin/find/function.c:              new->e_orig = ereallocarray(NULL, cnt, 
sizeof(char *));
./usr.bin/find/function.c:              new->e_len = ereallocarray(NULL, cnt, 
sizeof(int));
./usr.bin/find/function.c:      new->e_argv = ereallocarray(NULL, cnt, 
sizeof(char *));
./usr.bin/find/function.c:      new->e_orig = ereallocarray(NULL, cnt, 
sizeof(char *));
./usr.bin/find/function.c:      new->e_len = ereallocarray(NULL, cnt, 
sizeof(int));
./usr.bin/find/main.c:  p = paths = ereallocarray(NULL, argc, sizeof(char *));
./usr.bin/find/main.c:  if (!(paths2 = reallocarray(paths, p - paths + 1, 
sizeof(char *))))
./usr.bin/find/misc.c:  if ((p = reallocarray(oldp, sz1, sz2)) != NULL)
./usr.bin/ftp/fetch.c:                  if ((q = reallocarray(buf, len, 2)) == 
NULL)
./usr.bin/ftp/stringlist.c:             sl->sl_str = reallocarray(sl->sl_str, 
sl->sl_max,
./usr.bin/grep/grep.c:          pattern = grep_reallocarray(pattern, 
++pattern_sz, sizeof(*pattern));
./usr.bin/grep/grep.c:                          expr = grep_reallocarray(expr, 
++expr_sz,
./usr.bin/grep/util.c:  if ((ptr = reallocarray(ptr, nmemb, size)) == NULL)
./usr.bin/indent/lexi.c:        specials2 = reallocarray(specials, newspecials, 
sizeof(specials[0]));
./usr.bin/join/join.c:                  if ((p = reallocarray(F->set, newsize, 
sizeof(LINE)))
./usr.bin/join/join.c:                          if ((p = 
reallocarray(lp->fields, newsize,
./usr.bin/join/join.c:                  if ((p = reallocarray(olist, newsize, 
sizeof(OLIST)))
./usr.bin/kdump/kdump.c:        tmp = reallocarray(pe_table, pe_size + 1, 
sizeof(*pe_table));
./usr.bin/locate/locate/util.c:                 if ((newdbv = reallocarray(dbv, 
vlen + 2,
./usr.bin/m4/eval.c:            m4wraps = xreallocarray(m4wraps, maxwraps, 
sizeof(*m4wraps),
./usr.bin/m4/gnum4.c:           pmatch = xreallocarray(NULL, re.re_nsub+1, 
sizeof(regmatch_t), 
./usr.bin/m4/gnum4.c:   pmatch = xreallocarray(NULL, re.re_nsub+1, 
sizeof(regmatch_t), NULL);
./usr.bin/m4/look.c:            kept = xreallocarray(kept, kept_capacity, 
./usr.bin/m4/main.c:    mstack = xreallocarray(NULL, STACKMAX, sizeof(stae), 
NULL);
./usr.bin/m4/main.c:    mstack = xreallocarray(mstack, STACKMAX, sizeof(stae),
./usr.bin/m4/misc.c:    outfile = xreallocarray(outfile, n, sizeof(FILE *),
./usr.bin/m4/misc.c:    void *p = reallocarray(old, s1, s2);
./usr.bin/make/dump.c:  void **t = ereallocarray(NULL, n+1, sizeof(void *));
./usr.bin/make/garray.h:                (l)->a = ereallocarray((l)->a,          
\
./usr.bin/make/garray.h:        (l)->a = ereallocarray(NULL, (l)->size, 
sizeof(GNode *));       \
./usr.bin/make/memory.c:        if ((ptr = reallocarray(ptr, s1, s2)) == NULL)
./usr.bin/make/str.c:   char **argv = ereallocarray(NULL, argmax + 1, 
sizeof(char *));
./usr.bin/make/str.c:                           argv = ereallocarray(argv,
./usr.bin/make/varmodifiers.c:  t = ereallocarray(NULL, n, sizeof(struct Name));
./usr.bin/make/varmodifiers.c:                  t = ereallocarray(t, n, 
sizeof(struct Name));
./usr.bin/make/varmodifiers.c:  p2.matches = ereallocarray(NULL, p2.nsub, 
sizeof(regmatch_t));
./usr.bin/mandoc/cgi.c:         argv = mandoc_reallocarray(argv, argc + 1, 
sizeof(char *));
./usr.bin/mandoc/eqn.c:                 ep->defs = mandoc_reallocarray(ep->defs,
./usr.bin/mandoc/mdoc_argv.c:           *retv = mandoc_reallocarray(*retv, 
retc, sizeof(**retv));
./usr.bin/mandoc/mdoc_argv.c:                   v->value = 
mandoc_reallocarray(v->value,
./usr.bin/mandoc/mandoc_aux.c:  ptr = reallocarray(ptr, num, size);
./usr.bin/mandoc/mandocdb.c:                    dirs.paths = 
mandoc_reallocarray(NULL,
./usr.bin/mandoc/manpath.c:     dirs->paths = mandoc_reallocarray(dirs->paths,
./usr.bin/mandoc/mansearch.c:                           *res = 
mandoc_reallocarray(*res,
./usr.bin/mandoc/mdoc_validate.c:       n->args->argv = 
mandoc_reallocarray(n->args->argv,
./usr.bin/mandoc/mdoc_validate.c:       argv->value = 
mandoc_reallocarray(argv->value,
./usr.bin/mandoc/roff.c:                        r->rstack = 
mandoc_reallocarray(r->rstack,
./usr.bin/mandoc/term.c:                p->fontq = mandoc_reallocarray(p->fontq,
./usr.bin/mandoc/term.c:        p->buf = mandoc_reallocarray(p->buf, 
p->maxcols, sizeof(int));
./usr.bin/mandoc/term_ascii.c:  p->fontq = mandoc_reallocarray(NULL,
./usr.bin/mandoc/term_ps.c:     p->fontq = mandoc_reallocarray(NULL,
./usr.bin/mandoc/term_ps.c:             p->ps->pdfobjs = 
mandoc_reallocarray(p->ps->pdfobjs,
./usr.bin/mg/autoexec.c:                                npfl = 
reallocarray(pfl, have + AUTO_GROW + 1,
./usr.bin/mg/display.c:         if ((tmp = reallocarray((a), (n), (m))) == 
NULL) {\
./usr.bin/mg/display.c:         TRYREALLOCARRAY(score, newrow * newrow, 
sizeof(struct score));
./usr.bin/mg/display.c:         TRYREALLOCARRAY(vscreen, (newrow - 1), 
sizeof(struct video *));
./usr.bin/mg/display.c:         TRYREALLOCARRAY(pscreen, (newrow - 1), 
sizeof(struct video *));
./usr.bin/mg/display.c:         TRYREALLOCARRAY(video, (2 * (newrow - 1)), 
sizeof(struct video));
./usr.bin/mklocale/yacc.y:    u_int32_t *r = (u_int32_t *)reallocarray(NULL, 
sz, sizeof(u_int32_t));
./usr.bin/mklocale/yacc.y:    u_int32_t *r = (u_int32_t *)reallocarray(old, sz, 
sizeof(u_int32_t));
./usr.bin/patch/inp.c:  p = reallocarray(i_ptr, new_size + 2, sizeof(char *));
./usr.bin/patch/pch.c:  new_p_line = reallocarray(p_line, new_hunkmax, 
sizeof(char *));
./usr.bin/patch/pch.c:  new_p_len = reallocarray(p_len, new_hunkmax, 
sizeof(short));
./usr.bin/patch/pch.c:  new_p_char = reallocarray(p_char, new_hunkmax, 
sizeof(char));
./usr.bin/rcs/buf.c:    b->cb_buf = xreallocarray(b->cb_buf, 1, b->cb_size + 
len);
./usr.bin/rcs/diff.c:   member = xreallocarray(member, slen[1] + 2, 
sizeof(*member));
./usr.bin/rcs/diff.c:   class = xreallocarray(class, slen[0] + 2, 
sizeof(*class));
./usr.bin/rcs/diff.c:   J = xreallocarray(J, len[0] + 2, sizeof(*J));
./usr.bin/rcs/diff.c:   ixold = xreallocarray(ixold, len[0] + 2, 
sizeof(*ixold));
./usr.bin/rcs/diff.c:   ixnew = xreallocarray(ixnew, len[1] + 2, 
sizeof(*ixnew));
./usr.bin/rcs/diff.c:                   p = xreallocarray(p, sz + 3, 
sizeof(*p));
./usr.bin/rcs/diff.c:           clist = xreallocarray(clist, clistlen, 
sizeof(*clist));
./usr.bin/rcs/diff.c:                   context_vec_start = 
xreallocarray(context_vec_start,
./usr.bin/rcs/diff3.c:          buf = xreallocarray(buf, 1, bufsize);
./usr.bin/rcs/diff3.c:  d13 = xreallocarray(d13, newsz, sizeof(*d13));
./usr.bin/rcs/diff3.c:  d23 = xreallocarray(d23, newsz, sizeof(*d23));
./usr.bin/rcs/diff3.c:  de = xreallocarray(de, newsz, sizeof(*de));
./usr.bin/rcs/diff3.c:  overlap = xreallocarray(overlap, newsz, 
sizeof(*overlap));
./usr.bin/rcs/rcsdiff.c:                diff_ignore_pats = 
xreallocarray(diff_ignore_pats, len, 1);
./usr.bin/rcs/rcsnum.c:                 nump->rn_id = xreallocarray(nump->rn_id,
./usr.bin/rcs/rcsnum.c:         nump->rn_id = xreallocarray(nump->rn_id,
./usr.bin/rcs/rcsnum.c: num->rn_id = xreallocarray(num->rn_id, len, 
sizeof(*(num->rn_id)));
./usr.bin/rcs/rcsparse.c:       pdp->rp_buf = xreallocarray(pdp->rp_buf, 1,
./usr.bin/rcs/rcsprog.c:                        *cmd_argv = 
xreallocarray(*cmd_argv, cur,
./usr.bin/rcs/rcsprog.c:                *cmd_argv = xreallocarray(*cmd_argv, 
cur,
./usr.bin/rcs/rcsutil.c:                av->argv = xreallocarray(av->argv,
./usr.bin/rcs/xmalloc.c:        new_ptr = reallocarray(ptr, nmemb, size);
./usr.bin/rs/rs.c:      p = reallocarray(elem, newsize, sizeof(char *));
./usr.bin/rup/rup.c:            newrup = reallocarray(rup_data, newsize,
./usr.bin/rusers/rusers.c:              hostinfo = reallocarray(hostinfo, 
maxentries,
./usr.bin/sed/compile.c:        appends = xreallocarray(NULL, appendnum, 
sizeof(struct s_appends));
./usr.bin/sed/compile.c:        match = xreallocarray(NULL, maxnsub + 1, 
sizeof(regmatch_t));
./usr.bin/sed/misc.c:   if ((p = reallocarray(o, nmemb, size)) == NULL)
./usr.bin/sed/process.c:                                        appends = 
xreallocarray(appends,
./usr.bin/sed/process.c:                                        appends = 
xreallocarray(appends,
./usr.bin/sort/sort.c:          if ((p = reallocarray(fldtab, ND,               
\
./usr.bin/ssh/auth2-pubkey.c:       (tmp = reallocarray(authctxt->prev_userkeys,
./usr.bin/ssh/krl.c:            tmp_ca_used = reallocarray(ca_used, nca_used + 
1,
./usr.bin/systat/cache.c:               sc_store = reallocarray(NULL, max, 
sizeof(struct sc_ent));
./usr.bin/systat/if.c:                  if ((newstats = reallocarray(ifstats, 
ifm.ifm_index + 4,
./usr.bin/systat/mbufs.c:               ifi = reallocarray(interfaces, nif, 
sizeof(*interfaces));
./usr.bin/systat/mbufs.c:                       ifr = 
reallocarray(ifi->data.ifri_entries,
./usr.bin/systat/netstat.c:             ni = reallocarray(netinfos, a, 
sizeof(*ni));
./usr.bin/systat/pftop.c:               state_buf = reallocarray(state_buf, len,
./usr.bin/systat/pftop.c:               state_ord = reallocarray(state_ord, 
len, sizeof(u_int32_t));
./usr.bin/systat/pftop.c:               state_cache = reallocarray(state_cache, 
len,
./usr.bin/systat/pftop.c:               rules = reallocarray(NULL, num_rules, 
sizeof(struct pf_rule));
./usr.bin/systat/pftop.c:               rules = reallocarray(rules, num_rules, 
sizeof(struct pf_rule));
./usr.bin/systat/pigs.c:                p = reallocarray(pb_indices, nproc + 1, 
sizeof(int));
./usr.bin/systat/pool.c:                struct pool_info *p = 
reallocarray(pools, np, sizeof(*pools));
./usr.bin/systat/sensors.c:             s = reallocarray(sensors, a, 
sizeof(struct sensinfo));
./usr.bin/tcpbench/tcpbench.c:          if ((ret = reallocarray(ret, (++n + 1), 
sizeof(*ret))) == NULL)
./usr.bin/tcpbench/tcpbench.c:                  errx(1, "reallocarray(kvars)");
./usr.bin/telnet/telnet.c:      argv = reallocarray(NULL, n+3, sizeof(char *));
./usr.bin/tmux/array.h:         (a)->list = xreallocarray((a)->list, 2, 
(a)->space);    \
./usr.bin/tmux/cmd-string.c:                            argv = 
xreallocarray(argv, argc + 1,
./usr.bin/tmux/format.c:                *buf = xreallocarray(*buf, 2, *len);
./usr.bin/tmux/format.c:                                buf = 
xreallocarray(buf, 2, len);
./usr.bin/tmux/format.c:                                buf = 
xreallocarray(buf, 2, len);
./usr.bin/tmux/format.c:                                        buf = 
xreallocarray(buf, 2, len);
./usr.bin/tmux/grid.c:  gd->linedata = xreallocarray(gd->linedata, yy + 1,
./usr.bin/tmux/grid.c:  gd->linedata = xreallocarray(gd->linedata, yy + 1,
./usr.bin/tmux/grid.c:  gl->celldata = xreallocarray(gl->celldata, sx, sizeof 
*gl->celldata);
./usr.bin/tmux/grid.c:                  buf = xreallocarray(buf, 2, len);
./usr.bin/tmux/grid.c:  dst_gl->celldata = xreallocarray(dst_gl->celldata, nx,
./usr.bin/tmux/grid.c:          dst_gl->celldata = xreallocarray(NULL, to_copy,
./usr.bin/tmux/paste.c: buf = xreallocarray(NULL, len, 4 + 4);
./usr.bin/tmux/screen.c:        gd->linedata = xreallocarray(gd->linedata, 
gd->hsize + sy,
./usr.bin/tmux/utf8.c:          dst = xreallocarray(dst, n + 1, sizeof *dst);
./usr.bin/tmux/utf8.c:  dst = xreallocarray(dst, n + 1, sizeof *dst);
./usr.bin/tmux/utf8.c:          dst = xreallocarray(dst, n + src->size, 1);
./usr.bin/tmux/utf8.c:  dst = xreallocarray(dst, n + 1, 1);
./usr.bin/tput/tput.c:                                  av = reallocarray(av, n,
./usr.bin/tsort/tsort.c:        return ereallocarray(NULL, 1, s);
./usr.bin/tsort/tsort.c:        return emem(reallocarray(p, n, s));
./usr.bin/tsort/tsort.c:        l = ereallocarray(NULL, 1, sizeof(struct link));
./usr.bin/tsort/tsort.c:        heap->t = ereallocarray(NULL, 
ohash_entries(hash),
./usr.bin/tsort/tsort.c:        remaining->t = ereallocarray(NULL, 
ohash_entries(hash),
./usr.bin/openssl/apps.c:               arg->data = reallocarray(NULL, 
arg->count, sizeof(char *));
./usr.bin/openssl/apps.c:                       tmp_p = reallocarray(arg->data, 
tlen, sizeof(char *));
./usr.bin/openssl/apps.c:       ne_types = reallocarray(NULL, max_ne, 
sizeof(char *));
./usr.bin/openssl/apps.c:       ne_values = reallocarray(NULL, max_ne, 
sizeof(char *));
./usr.bin/openssl/apps.c:       mval = reallocarray(NULL, max_ne, sizeof(int));
./usr.bin/openssl/ca.c: if ((irow = reallocarray(NULL, DB_NUMBER + 1, 
sizeof(char *))) ==
./usr.bin/openssl/ca.c:         if ((irow = reallocarray(NULL, sizeof(char *),
./usr.bin/openssl/ecparam.c:            curves = reallocarray(NULL, crv_len, 
sizeof(EC_builtin_curve));
./usr.bin/openssl/rsautl.c:     rsa_in = reallocarray(NULL, keysize, 2);
./usr.bin/openssl/speed.c:      fds = reallocarray(NULL, multi, sizeof *fds);
./usr.bin/users/users.c:                                newnames = 
reallocarray(names, newmax,
./usr.bin/vi/common/mem.h:      if (((p) = (cast)(reallocarray((p), (nelem), 
(size)))) == NULL) \
./usr.bin/vi/ex/ex_argv.c:              REALLOCARRAY(sp, exp->args, ARGS **, 
cnt, sizeof(ARGS *));
./usr.bin/vi/ex/ex_argv.c:              REALLOCARRAY(sp, ap->bp, CHAR_T *, 
ap->blen, sizeof(CHAR_T));
./usr.bin/vi/ex/ex_subst.c:             REALLOCARRAY((sp), (sp)->newl, size_t 
*,                \
./usr.bin/yacc/reader.c:                tag_table = reallocarray(tag_table, 
tagmax, sizeof(char *));
./usr.bin/yacc/reader.c:        plhs = reallocarray(NULL, maxrules, 
sizeof(bucket *));
./usr.bin/yacc/reader.c:        rprec = reallocarray(NULL, maxrules, 
sizeof(short));
./usr.bin/yacc/reader.c:        rassoc = reallocarray(NULL, maxrules, 
sizeof(char));
./usr.bin/yacc/reader.c:        pitem = reallocarray(pitem, maxitems, 
sizeof(bucket *));
./usr.bin/yacc/reader.c:        plhs = reallocarray(plhs, maxrules, 
sizeof(bucket *));
./usr.bin/yacc/reader.c:        rprec = reallocarray(rprec, maxrules, 
sizeof(short));
./usr.bin/yacc/reader.c:        rassoc = reallocarray(rassoc, maxrules, 
sizeof(char));
./usr.bin/yacc/reader.c:        symbol_name = reallocarray(NULL, nsyms, 
sizeof(char *));
./usr.bin/yacc/reader.c:        symbol_value = reallocarray(NULL, nsyms, 
sizeof(short));
./usr.bin/yacc/reader.c:        symbol_prec = reallocarray(NULL, nsyms, 
sizeof(short));
./usr.bin/yacc/reader.c:        v = reallocarray(NULL, nsyms, sizeof(bucket *));
./usr.bin/yacc/reader.c:        ritem = reallocarray(NULL, nitems, 
sizeof(short));
./usr.bin/yacc/reader.c:        rlhs = reallocarray(NULL, nrules, 
sizeof(short));
./usr.bin/yacc/reader.c:        rrhs = reallocarray(NULL, nrules + 1, 
sizeof(short));
./usr.bin/yacc/reader.c:        rprec = reallocarray(rprec, nrules, 
sizeof(short));
./usr.bin/yacc/verbose.c:       null_rules = reallocarray(NULL, nrules, 
sizeof(short));
./usr.sbin/amd/amd/host_ops.c:  ep = xreallocarray(NULL, n_export, sizeof *ep);
./usr.sbin/amd/amd/host_ops.c:  fp = xreallocarray(NULL, n_export, sizeof *fp);
./usr.sbin/amd/amd/map.c:       exported_ap = xreallocarray(exported_ap, nsize, 
sizeof *exported_ap);
./usr.sbin/amd/amd/nfsx_ops.c:  fo->opt_fs = xreallocarray(fo->opt_fs, len + 1 
+ 1, 1);
./usr.sbin/amd/amd/nfsx_ops.c:          nx->nx_v = xreallocarray(NULL, 
nx->nx_c, sizeof *nx->nx_v);
./usr.sbin/amd/amd/util.c:      p = xreallocarray(p, l1 + l2 + l3 + 1, 1);
./usr.sbin/amd/amd/util.c:      p = xreallocarray(p, len, 1);
./usr.sbin/amd/amd/util.c:      ivec = xreallocarray(NULL, ic + 1, sizeof 
*ivec);
./usr.sbin/amd/amd/util.c:              ivec = xreallocarray(ivec, ic + 1, 
sizeof *ivec);
./usr.sbin/amd/amd/xutil.c:     ptr = reallocarray(ptr, nmemb, size);
./usr.sbin/bgpctl/irr_asset.c:  if ((p = reallocarray(curass->members,
./usr.sbin/bgpctl/irr_asset.c:  if ((p = reallocarray(ass->as,
./usr.sbin/bgpctl/irr_asset.c:  if ((p = reallocarray(ass->as_set,
./usr.sbin/bgpctl/irr_prefix.c: if ((p = reallocarray(curpfxs->prefix,
./usr.sbin/bgpctl/irr_prefix.c: if ((p = reallocarray(pfxs->prefix, newcnt, 
sizeof(void *))) == NULL)
./usr.sbin/bgpctl/mrtparser.c:                  ap = reallocarray(re->attrs,
./usr.sbin/bgpd/kroute.c:               if ((xkrt = reallocarray(krt, rtableid 
+ 1,
./usr.sbin/bgpd/pfkey.c:        if ((data = reallocarray(NULL, 
hdr.sadb_msg_len, PFKEY2_CHUNK)) == NULL) {
./usr.sbin/bgpd/pftable.c:      tmp = reallocarray(pft->worklist, pft->nalloc, 
sizeof(*tmp));
./usr.sbin/bgpd/rde.c:                  if ((newp = reallocarray(pfd,
./usr.sbin/bgpd/rde_attr.c:     if ((p = reallocarray(asp->others,
./usr.sbin/bgpd/rde_attr.c:     if ((p = reallocarray(NULL, ncommunities, 4)) 
== NULL)
./usr.sbin/bgpd/rde_attr.c:     if ((p = reallocarray(NULL, ncommunities, 
sizeof(community))) == NULL)
./usr.sbin/bgpd/rde_rib.c:              if ((xribs = reallocarray(ribs, id + 1,
./usr.sbin/bgpd/session.c:                      if ((newp = 
reallocarray(peer_l, peer_cnt,
./usr.sbin/bgpd/session.c:                      if ((newp = reallocarray(mrt_l, 
mrt_cnt,
./usr.sbin/bgpd/session.c:                      if ((newp = reallocarray(pfd, 
new_cnt,
./usr.sbin/config/hash.c:       h = ereallocarray(NULL, sz, sizeof *h);
./usr.sbin/config/main.c:       newopts = ereallocarray(NULL, nnewopts, 
sizeof(struct opt));
./usr.sbin/config/mkioconf.c:           locnames = ereallocarray(locnames, 
maxlocnames, sizeof(char *));
./usr.sbin/config/mkioconf.c:           locnami = ereallocarray(locnami, 
maxlocnami, sizeof(short));
./usr.sbin/config/pack.c:       locators.vec = ereallocarray(NULL, locspace, 
sizeof(*locators.vec));
./usr.sbin/config/pack.c:       parents.vec = ereallocarray(NULL, pvecspace, 
sizeof(*parents.vec));
./usr.sbin/config/pack.c:       packed = ereallocarray(NULL, ndevi + 1, sizeof 
*packed);
./usr.sbin/config/pack.c:               p = ereallocarray(NULL, n, sizeof *p);
./usr.sbin/config/pack.c:               p = ereallocarray(NULL, n, sizeof *p);
./usr.sbin/config/pack.c:       dst->i_parents = q = 
ereallocarray(dst->i_parents, new + 1, sizeof(*q));
./usr.sbin/config/pack.c:       vec = ereallocarray(NULL, longest_pvec, 
sizeof(*vec));
./usr.sbin/config/sem.c:                lp = ereallocarray(NULL, attr->a_loclen 
+ 1, 
./usr.sbin/config/util.c:       if ((p = reallocarray(p, sz1, sz2)) == NULL)
./usr.sbin/cron/env.c:  p = reallocarray(envp, count+1, sizeof(char **));
./usr.sbin/dhcpd/dispatch.c:            fds = reallocarray(fds, nfds, 
sizeof(struct pollfd));
./usr.sbin/lpr/common_source/common.c:                  newqueue = 
reallocarray(queue,
./usr.sbin/lpr/lpd/lpd.c:                       newsocks = reallocarray(socks, 
maxs + 1, sizeof(int));
./usr.sbin/installboot/i386_installboot.c:      ph = reallocarray(NULL, 
eh.e_phnum, sizeof(Elf_Phdr));
./usr.sbin/ldomctl/util.c:      p = reallocarray(o, nmemb, size);
./usr.sbin/ldomd/ds.c:  pfd = xreallocarray(NULL, num_ds_conns, sizeof(*pfd));
./usr.sbin/mailwrapper/mailwrapper.c:           al->argv = 
reallocarray(al->argv, al->maxc, sizeof(char *));
./usr.sbin/npppd/npppd/mppe.c:          _this->old_session_keys = 
reallocarray(NULL,
./usr.sbin/npppd/npppd/npppd_ctl.c:             started_ppp = 
reallocarray(_this->started_ppp,
./usr.sbin/ntpd/ntp.c:                  if ((newp = reallocarray(idx2peer, 
peer_cnt,
./usr.sbin/ntpd/ntp.c:                  if ((newp = reallocarray(pfd, new_cnt,
./usr.sbin/pppd/main.c: char **newenv = reallocarray(script_env,
./usr.sbin/pstat/pstat.c:               if ((itp = reallocarray(NULL, ntty, 
sizeof(struct itty))) == NULL)
./usr.sbin/rarpd/rarpd.c:       pfd = reallocarray(NULL, numfd, sizeof(*pfd));
./usr.sbin/rdate/ntpleaps.c:    if ((l = reallocarray(NULL, r, 
sizeof(u_int64_t))) == NULL) {
./usr.sbin/route6d/route6d.c:           p = reallocarray(index2ifc, nindex2ifc, 
sizeof(*index2ifc));
./usr.sbin/sasyncd/pfkey.c:     data = reallocarray(NULL, hdr.sadb_msg_len, 
CHUNK);
./usr.sbin/smtpd/enqueue.c:     if ((nrcpts = reallocarray(msg.rcpts,
./usr.sbin/smtpd/smtpctl.c:                             evpids = 
reallocarray(evpids, alloc,
./usr.sbin/smtpd/util.c:        args->list = reallocarray(args->list, nalloc, 
sizeof(char *));
./usr.sbin/snmpd/kroute.c:              if ((xkrt = reallocarray(krt, rtableid 
+ 1,
./usr.sbin/snmpd/pf.c:          p = reallocarray(b->pfrb_caddr, minsize, bs);
./usr.sbin/tcpdump/addrtoname.c:        tp->e_name = cp = reallocarray(NULL, 
len, 3);
./usr.sbin/user/defs.h: if ((ptr = (type *) reallocarray(ptr,                   
        \
./usr.sbin/ypserv/yppush/yppush.c:                      newp = 
reallocarray(pfd, svc_max_pollfd, sizeof(*pfd));
./usr.sbin/ypserv/ypserv/ypserv.c:                      newp = 
reallocarray(pfd, svc_max_pollfd, sizeof(*pfd));

Reply via email to