=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/varmodifiers.c,v retrieving revision 1.37 retrieving revision 1.38 diff -c -r1.37 -r1.38 *** src/usr.bin/make/varmodifiers.c 2014/05/12 19:11:19 1.37 --- src/usr.bin/make/varmodifiers.c 2014/05/18 08:08:50 1.38 *************** *** 1,4 **** ! /* $OpenBSD: varmodifiers.c,v 1.37 2014/05/12 19:11:19 espie Exp $ */ /* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: varmodifiers.c,v 1.38 2014/05/18 08:08:50 espie Exp $ */ /* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */ /* *************** *** 1414,1420 **** p2.nsub = 1; if (p2.nsub > 10) p2.nsub = 10; ! p2.matches = emalloc(p2.nsub * sizeof(regmatch_t)); result = VarModify((char *)s, VarRESubstitute, &p2); regfree(&p2.re); free(p2.matches); --- 1414,1420 ---- p2.nsub = 1; if (p2.nsub > 10) p2.nsub = 10; ! p2.matches = ereallocarray(NULL, p2.nsub, sizeof(regmatch_t)); result = VarModify((char *)s, VarRESubstitute, &p2); regfree(&p2.re); free(p2.matches);