Index: editline/common.c =================================================================== RCS file: /usr/cvsroot/asterisk/editline/common.c,v retrieving revision 1.1 diff -u -p -r1.1 common.c --- editline/common.c 27 Nov 2002 05:04:06 -0000 1.1 +++ editline/common.c 14 Jul 2004 07:52:32 -0000 @@ -676,7 +676,7 @@ ed_prev_history(EditLine *el, int c) if (el->el_history.eventno == 0) { /* save the current buffer * away */ (void) strncpy(el->el_history.buf, el->el_line.buffer, - EL_BUFSIZ); + EL_BUFSIZ - 1); el->el_history.last = el->el_history.buf + (el->el_line.lastchar - el->el_line.buffer); } @@ -742,7 +742,7 @@ ed_search_prev_history(EditLine *el, int } if (el->el_history.eventno == 0) { (void) strncpy(el->el_history.buf, el->el_line.buffer, - EL_BUFSIZ); + EL_BUFSIZ - 1); el->el_history.last = el->el_history.buf + (el->el_line.lastchar - el->el_line.buffer); }