diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-10-08 05:24:43 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-10-08 05:24:43 +0000 |
commit | 32c98a47bcfec9d3706e264af1c15d9dd87d0ae4 (patch) | |
tree | 81ef3b1a9e4a08da9659a4b793ef9ea532c427ab /usr.sbin | |
parent | 3631bebfa768876594219553ea3a644b345a8752 (diff) |
obvious reallocarray()
Diffstat (limited to 'usr.sbin')
-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); |