From: David Lawrence Ramsey Date: Tue, 4 Jan 2005 04:02:45 +0000 (+0000) Subject: tweak the charealloc() in do_output() to more closely match the old X-Git-Tag: v1.3.6~173 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b6fbdd00cfddf10f2cd6f4422dbd2111d3decd9d;p=nano.git tweak the charealloc() in do_output() to more closely match the old charealloc() in do_char(), to avoid another memory corruption problem git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2229 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/src/nano.c b/src/nano.c index 021d3097..9a7c35ea 100644 --- a/src/nano.c +++ b/src/nano.c @@ -3643,7 +3643,7 @@ void do_output(int *kbinput, size_t kbinput_len) /* More dangerousness fun =) */ current->data = charealloc(current->data, - current_len + key_len + 1); + current_len + key_len + 2); assert(current_x <= current_len);