summaryrefslogtreecommitdiff
path: root/lib/libkeynote
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-10-08 11:28:08 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-10-08 11:28:08 +0000
commitec6f65d2ece18e6bcaf67bcee2c0e6c72160979e (patch)
tree4e08fea2b557043c312c75ceb45331a6203df2cd /lib/libkeynote
parentc3a9e030fde932dc513f88c9a5e8d3909532d5f0 (diff)
obvious reallocarray()
Diffstat (limited to 'lib/libkeynote')
-rw-r--r--lib/libkeynote/environment.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libkeynote/environment.c b/lib/libkeynote/environment.c
index f982225ee4a..59bd61bc7f4 100644
--- a/lib/libkeynote/environment.c
+++ b/lib/libkeynote/environment.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: environment.c,v 1.21 2013/11/29 19:00:51 deraadt Exp $ */
+/* $OpenBSD: environment.c,v 1.22 2014/10/08 11:28:07 deraadt Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu)
*
@@ -882,8 +882,8 @@ kn_read_asserts(char *buffer, int bufferlen, int *numassertions)
if (*numassertions > bufsize - 4)
{
/* Allocate twice the space */
- tempbuf = (char **) realloc(buf, 2 * bufsize *
- sizeof(char *));
+ tempbuf = reallocarray(buf, bufsize,
+ 2 * sizeof(char *));
if (tempbuf == (char **) NULL)
{
for (flag = 0; flag < *numassertions; flag++)