From f46a86e76161cda7aded89914c90fd8972ec8767 Mon Sep 17 00:00:00 2001 From: tedu Date: Tue, 22 Apr 2014 21:24:20 +0000 Subject: [PATCH] use reallocarray --- usr.bin/signify/signify.c | 6 +++--- 1 file 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 * @@ -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'))) -- 2.20.1