diff options
author | 2014-10-08 05:24:42 +0000 | |
---|---|---|
committer | 2014-10-08 05:24:42 +0000 | |
commit | 87ac27bb52640dcdb7c860dedbdcccbe20ed8909 (patch) | |
tree | 27199139a09cd541de9a6d082a7b515cc25ce97a | |
parent | if SMALL_KERNEL do not register the imc_watchdog_cb callback. We still (diff) | |
download | wireguard-openbsd-87ac27bb52640dcdb7c860dedbdcccbe20ed8909.tar.xz wireguard-openbsd-87ac27bb52640dcdb7c860dedbdcccbe20ed8909.zip |
obvious reallocarray()
-rw-r--r-- | usr.sbin/snmpd/pf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/snmpd/pf.c b/usr.sbin/snmpd/pf.c index 304b0a4db13..b4d162c5531 100644 --- a/usr.sbin/snmpd/pf.c +++ b/usr.sbin/snmpd/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.6 2013/09/07 04:43:21 joel Exp $ */ +/* $OpenBSD: pf.c,v 1.7 2014/10/08 05:24:42 deraadt Exp $ */ /* * Copyright (c) 2012 Joel Knight <joel@openbsd.org> @@ -148,7 +148,7 @@ pfr_buf_grow(struct pfr_buffer *b, int minsize) /* msize overflow */ return (-1); } - p = realloc(b->pfrb_caddr, minsize * bs); + p = reallocarray(b->pfrb_caddr, minsize, bs); if (p == NULL) return (-1); bzero(p + b->pfrb_msize * bs, (minsize - b->pfrb_msize) * bs); |