Merge remaining audit patch (save dlfcn.c)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-07-14 13:57:15 +00:00
parent 9cd917c42a
commit 044ad2e2e7
20 changed files with 123 additions and 116 deletions

View File

@@ -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);
}

View File

@@ -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);