mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-28 23:53:19 +03:00
Not moving too many bytes -- that is: not moving them beyond the
allocated buffer. This fixes Savannah bug #47219. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5662 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
c115166f5b
commit
7c0e433305
@ -4,6 +4,8 @@
|
|||||||
* src/winio.c (edit_scroll): The amount to scroll is never zero.
|
* src/winio.c (edit_scroll): The amount to scroll is never zero.
|
||||||
* src/prompt.c (do_statusbar_prev_word, do_statusbar_next_word),
|
* src/prompt.c (do_statusbar_prev_word, do_statusbar_next_word),
|
||||||
src/move.c (do_prev_word, do_next_word): Sort these in standard way.
|
src/move.c (do_prev_word, do_next_word): Sort these in standard way.
|
||||||
|
* src/prompt.c (do_statusbar_output): Don't move too many bytes.
|
||||||
|
This fixes Savannah bug #47219 (uncovered by r5655).
|
||||||
|
|
||||||
2016-02-21 Benno Schulenberg <bensberg@justemail.net>
|
2016-02-21 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/files.c (input_tab): If the first Tab added the part that all
|
* src/files.c (input_tab): If the first Tab added the part that all
|
||||||
|
@ -290,7 +290,7 @@ void do_statusbar_output(int *the_input, size_t input_len,
|
|||||||
assert(statusbar_x <= answer_len);
|
assert(statusbar_x <= answer_len);
|
||||||
|
|
||||||
charmove(answer + statusbar_x + char_buf_len, answer + statusbar_x,
|
charmove(answer + statusbar_x + char_buf_len, answer + statusbar_x,
|
||||||
answer_len - statusbar_x + char_buf_len);
|
answer_len - statusbar_x + 1);
|
||||||
strncpy(answer + statusbar_x, char_buf, char_buf_len);
|
strncpy(answer + statusbar_x, char_buf, char_buf_len);
|
||||||
answer_len += char_buf_len;
|
answer_len += char_buf_len;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user