nano

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

commit df8c3debc8f140cfe6e2298cc96bf6e7091c5bcd
parent 374216fe229f05757b39c478688afcacc4365cc6
Author: Chris Allegretta <chrisa@asty.org>
Date:   Tue,  5 Jan 2010 23:35:50 +0000

2010-01-05 Tito <farmatito@tiscali.it>
        * search.c (update_history) - Fix bad length check causing search crash on armel platform.



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

Diffstat:
MChangeLog | 3+++
Msrc/search.c | 2+-
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,6 @@ +2010-01-05 Tito <farmatito@tiscali.it> + * search.c (update_history) - Fix bad length check causing search crash on armel platform. + 2010-01-04 Chris Allegretta <chrisa@asty.org> * winio.c: edit_update, edit_redraw - Fix search not scrolling to the middle of the screen (reported by alpha@qzx.com) and places where we rely on maxrows but should not. diff --git a/src/search.c b/src/search.c @@ -1357,7 +1357,7 @@ void update_history(filestruct **h, const char *s) assert(hage != NULL && hbot != NULL); /* If this string is already in the history, delete it. */ - p = find_history(*hage, *hbot, s, (size_t)-1); + p = find_history(*hage, *hbot, s, strlen(s)); if (p != NULL) { filestruct *foo, *bar;