summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-10-08 05:24:42 +0000
committerderaadt <deraadt@openbsd.org>2014-10-08 05:24:42 +0000
commit87ac27bb52640dcdb7c860dedbdcccbe20ed8909 (patch)
tree27199139a09cd541de9a6d082a7b515cc25ce97a
parentif SMALL_KERNEL do not register the imc_watchdog_cb callback. We still (diff)
downloadwireguard-openbsd-87ac27bb52640dcdb7c860dedbdcccbe20ed8909.tar.xz
wireguard-openbsd-87ac27bb52640dcdb7c860dedbdcccbe20ed8909.zip
obvious reallocarray()
-rw-r--r--usr.sbin/snmpd/pf.c4
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);