diff --git a/usr.bin/column/column.c b/usr.bin/column/column.c index ccaa8247ca29..ca2837dd5a68 100644 --- a/usr.bin/column/column.c +++ b/usr.bin/column/column.c @@ -247,10 +247,10 @@ maketbl(void) (cols[coloff] = wcstok(p, separator, &last)); p = NULL) if (++coloff == maxcols) { - if (!(cols = realloc(cols, (u_int)maxcols + - DEFCOLS * sizeof(char *))) || + if (!(cols = realloc(cols, ((u_int)maxcols + + DEFCOLS) * sizeof(char *))) || !(lens = realloc(lens, - (u_int)maxcols + DEFCOLS * sizeof(int)))) + ((u_int)maxcols + DEFCOLS) * sizeof(int)))) err(1, NULL); memset((char *)lens + maxcols * sizeof(int), 0, DEFCOLS * sizeof(int));