commit d90d64f718836206078d09ec66271f3bf6736e99
parent 179f0ea742b8c56ac4df1aa7adc3622a6ed358f4
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Tue, 4 Jan 2005 03:09:55 +0000
set the value of alloc_len properly again, as in DB's patch, in order to
avoid memory corruption problems
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2228 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/winio.c b/src/winio.c
@@ -2288,7 +2288,7 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool
assert(column <= start_col);
alloc_len = display_string_len(buf + start_index, start_col,
- start_col + COLS);
+ start_col + len) + 2;
converted = charalloc(alloc_len + 1);
index = 0;