summaryrefslogtreecommitdiffstats
path: root/lib/libedit
diff options
context:
space:
mode:
authorstefanf <stefanf@FreeBSD.org>2005-08-08 07:03:50 +0000
committerstefanf <stefanf@FreeBSD.org>2005-08-08 07:03:50 +0000
commitc72aa990fb62f093944cc3d8590a1dcd8fe7fbc5 (patch)
treeb947352186abb174f77ed9b3c1133c6c0300a095 /lib/libedit
parent31c555966c787974abf5860e5789a2cfeaf16250 (diff)
downloadFreeBSD-src-c72aa990fb62f093944cc3d8590a1dcd8fe7fbc5.zip
FreeBSD-src-c72aa990fb62f093944cc3d8590a1dcd8fe7fbc5.tar.gz
Don't forget to copy the sentinel into the `help' array. It's expected to
be there. Submitted by: Björn König PR: 82381
Diffstat (limited to 'lib/libedit')
-rw-r--r--lib/libedit/map.c4
1 files changed, 2 insertions, 2 deletions
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)
OpenPOWER on IntegriCloud