From 586c892910e541f9817373974089daa3bf5a2c2c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 21 Apr 1995 04:12:33 +0000 Subject: (add_tabstop): Give correct size when reallocating tab_list buffer. From Geoff Odhner (geoff@franklin.com). --- src/expand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3-54-g00ecf