sed: use reallocarray (non-issue)
This commit is contained in:
@@ -1428,7 +1428,7 @@ cmd_s(Cmd *c)
|
|||||||
lastre = re;
|
lastre = re;
|
||||||
|
|
||||||
plen = re->re_nsub + 1;
|
plen = re->re_nsub + 1;
|
||||||
pmatch = emalloc(plen * sizeof(regmatch_t));
|
pmatch = ereallocarray(NULL, plen, sizeof(regmatch_t));
|
||||||
|
|
||||||
*genbuf.str = '\0';
|
*genbuf.str = '\0';
|
||||||
s = patt.str;
|
s = patt.str;
|
||||||
|
|||||||
Reference in New Issue
Block a user