From 5d8654361451b217b1fc604f449554e74a11b70b Mon Sep 17 00:00:00 2001 From: markster Date: Wed, 14 Jul 2004 13:57:15 +0000 Subject: Merge remaining audit patch (save dlfcn.c) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3436 f38db490-d61c-443f-a65b-d21fe96a405b --- editline/common.c | 4 ++-- editline/hist.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'editline') diff --git a/editline/common.c b/editline/common.c index a6821e93f..c831e79a3 100755 --- a/editline/common.c +++ b/editline/common.c @@ -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 c) } 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); } diff --git a/editline/hist.c b/editline/hist.c index b9eb92480..11f39ae10 100755 --- a/editline/hist.c +++ b/editline/hist.c @@ -106,7 +106,7 @@ hist_get(EditLine *el) if (el->el_history.eventno == 0) { /* if really the current line */ (void) strncpy(el->el_line.buffer, el->el_history.buf, - el->el_history.sz); + el->el_history.sz - 1); el->el_line.lastchar = el->el_line.buffer + (el->el_history.last - el->el_history.buf); -- cgit v1.2.3