From e2edbdcb87c89d69ab8cbf1a753ead75ccea5949 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Fri, 17 Apr 2015 18:48:11 +0200 Subject: [PATCH] sed: use reallocarray (non-issue) --- sed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sed.c b/sed.c index 6b10eb6..6982c40 100644 --- a/sed.c +++ b/sed.c @@ -1428,7 +1428,7 @@ cmd_s(Cmd *c) lastre = re; plen = re->re_nsub + 1; - pmatch = emalloc(plen * sizeof(regmatch_t)); + pmatch = ereallocarray(NULL, plen, sizeof(regmatch_t)); *genbuf.str = '\0'; s = patt.str;