=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mklocale/yacc.y,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- src/usr.bin/mklocale/yacc.y 2012/12/05 23:20:25 1.5 +++ src/usr.bin/mklocale/yacc.y 2014/10/14 15:35:40 1.6 @@ -1,4 +1,4 @@ -/* $OpenBSD: yacc.y,v 1.5 2012/12/05 23:20:25 deraadt Exp $ */ +/* $OpenBSD: yacc.y,v 1.6 2014/10/14 15:35:40 deraadt Exp $ */ /* $NetBSD: yacc.y,v 1.24 2004/01/05 23:23:36 jmmv Exp $ */ %{ @@ -311,7 +311,7 @@ u_int32_t * xlalloc(size_t sz) { - u_int32_t *r = (u_int32_t *)malloc(sz * sizeof(u_int32_t)); + u_int32_t *r = (u_int32_t *)reallocarray(NULL, sz, sizeof(u_int32_t)); if (!r) { perror("xlalloc"); abort(); @@ -322,7 +322,7 @@ u_int32_t * xrelalloc(u_int32_t *old, size_t sz) { - u_int32_t *r = (u_int32_t *)realloc(old, sz * sizeof(u_int32_t)); + u_int32_t *r = (u_int32_t *)reallocarray(old, sz, sizeof(u_int32_t)); if (!r) { perror("xrelalloc"); abort();