nano

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

commit fc557563785565f64fdaac598dbf8b3eb0839107
parent 189fff44dc6de035d48f1d07fcd871a1c7f0498c
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Sat,  5 Apr 2014 18:59:46 +0000

Reloading a possibly freed function pointer.  Patch by Mike Frysinger.


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

Diffstat:
MChangeLog | 3+++
Msrc/nano.c | 3+++
2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,6 @@ +2014-04-05 Mike Frysinger <vapier@gentoo.org> + * src/nano.c (do_input): Reload possibly freed function pointer. + 2014-04-04 Benno Schulenberg <bensberg@justemail.net> * src/{files.c,nano.c}: Avoid two more compilation warnings. * configure.ac: Allow --enable-extra and --enable-multibuffer diff --git a/src/nano.c b/src/nano.c @@ -1675,6 +1675,9 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool #endif s->scfunc(); #ifndef DISABLE_COLOR + /* The command might have re-initialized shortcuts, + * in which case f is now invalid. Let's reload it. */ + f = sctofunc((sc *) s); if (f && !f->viewok && openfile->syntax != NULL && openfile->syntax->nmultis > 0) { reset_multis(openfile->current, FALSE);