summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-04-22 21:24:20 +0000
committertedu <tedu@openbsd.org>2014-04-22 21:24:20 +0000
commitf46a86e76161cda7aded89914c90fd8972ec8767 (patch)
tree593f3fa05ddf09738fd4e6a850d54e5ba436099a
parentMention 16-bit sound is supported nowadays. (diff)
downloadwireguard-openbsd-f46a86e76161cda7aded89914c90fd8972ec8767.tar.xz
wireguard-openbsd-f46a86e76161cda7aded89914c90fd8972ec8767.zip
use reallocarray
-rw-r--r--usr.bin/signify/signify.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/signify/signify.c b/usr.bin/signify/signify.c
index 410d8967c33..fe2e9d6165a 100644
--- a/usr.bin/signify/signify.c
+++ b/usr.bin/signify/signify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: signify.c,v 1.71 2014/04/22 05:44:40 tedu Exp $ */
+/* $OpenBSD: signify.c,v 1.72 2014/04/22 21:24:20 tedu Exp $ */
/*
* Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
*
@@ -549,8 +549,8 @@ verifychecksums(char *msg, int argc, char **argv, int quiet)
line = msg;
while (line && *line) {
- if (!(checksums = realloc(checksums,
- sizeof(*c) * (nchecksums + 1))))
+ if (!(checksums = reallocarray(checksums,
+ nchecksums + 1, sizeof(*checksums))))
err(1, "realloc");
c = &checksums[nchecksums++];
if ((endline = strchr(line, '\n')))