From c72aa990fb62f093944cc3d8590a1dcd8fe7fbc5 Mon Sep 17 00:00:00 2001 From: stefanf Date: Mon, 8 Aug 2005 07:03:50 +0000 Subject: Don't forget to copy the sentinel into the `help' array. It's expected to be there. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Submitted by: Björn König PR: 82381 --- lib/libedit/map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libedit/map.c') diff --git a/lib/libedit/map.c b/lib/libedit/map.c index 4f225e8..6714248 100644 --- a/lib/libedit/map.c +++ b/lib/libedit/map.c @@ -913,11 +913,11 @@ map_init(EditLine *el) el->el_map.vic = el_map_vi_command; el->el_map.vii = el_map_vi_insert; el->el_map.help = (el_bindings_t *) el_malloc(sizeof(el_bindings_t) * - EL_NUM_FCNS); + (EL_NUM_FCNS + 1)); if (el->el_map.help == NULL) return (-1); (void) memcpy(el->el_map.help, help__get(), - sizeof(el_bindings_t) * EL_NUM_FCNS); + sizeof(el_bindings_t) * (EL_NUM_FCNS + 1)); el->el_map.func = (el_func_t *)el_malloc(sizeof(el_func_t) * EL_NUM_FCNS); if (el->el_map.func == NULL) -- cgit v1.1