mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-05 19:01:57 +03:00
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
This commit is contained in:
parent
9dffac90e7
commit
28e19f8bbc
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user