summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-10-08 05:24:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-10-08 05:24:43 +0000
commit32c98a47bcfec9d3706e264af1c15d9dd87d0ae4 (patch)
tree81ef3b1a9e4a08da9659a4b793ef9ea532c427ab /usr.sbin
parent3631bebfa768876594219553ea3a644b345a8752 (diff)
obvious reallocarray()
Diffstat (limited to 'usr.sbin')
-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);