nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 28e19f8bbc8807a03d01dc786a36b861482cff19
parent 9dffac90e741be00e0311eaed162923e3aef551e
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Wed,  5 Jan 2005 15:42:45 +0000

fix potential memory corruption in do_output() when adding UTF-8
characters, found by valgrind


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2233 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
Msrc/nano.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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 + 2); + current_len + (key_len * 2)); assert(current_x <= current_len);