diff options
author | Jim Meyering <jim@meyering.net> | 1995-04-21 04:12:33 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1995-04-21 04:12:33 +0000 |
commit | 586c892910e541f9817373974089daa3bf5a2c2c (patch) | |
tree | 2e77c40af0369d8f8793ddd1af942b8aca07830f /src | |
parent | f9834f6bee3d07ab8a68d31cbbcf5ab6500340bd (diff) | |
download | coreutils-586c892910e541f9817373974089daa3bf5a2c2c.tar.xz |
(add_tabstop): Give correct size when reallocating tab_list buffer.
From Geoff Odhner (geoff@franklin.com).
Diffstat (limited to 'src')
-rw-r--r-- | src/expand.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/expand.c b/src/expand.c index 7813759cf..2488711de 100644 --- a/src/expand.c +++ b/src/expand.c @@ -229,7 +229,8 @@ add_tabstop (tabval) if (tabval == -1) return; if (first_free_tab % TABLIST_BLOCK == 0) - tab_list = (int *) xrealloc (tab_list, first_free_tab + TABLIST_BLOCK); + tab_list = (int *) xrealloc (tab_list, first_free_tab + + TABLIST_BLOCK * sizeof (tab_list[0])); tab_list[first_free_tab++] = tabval; } |