diff options
| author | 2018-10-11 15:19:09 +0000 | |
|---|---|---|
| committer | 2018-10-11 15:19:09 +0000 | |
| commit | d8c2a1519049fc89e646283cf6ee185acd17f1c7 (patch) | |
| tree | c390a07a0b802cb094c19a7ccc2e32d070e165c9 /lib/libedit/refresh.c | |
| parent | Backout my previous commit: (diff) | |
| download | wireguard-openbsd-d8c2a1519049fc89e646283cf6ee185acd17f1c7.tar.xz wireguard-openbsd-d8c2a1519049fc89e646283cf6ee185acd17f1c7.zip | |
In re_fastputc(), set lastline to the new line, not the previous
line so it gets initialized properly. Fixes a crash in bc with
MALLOC_OPTIONS=UJ. OK deraadt@, committing on behalf of yasuoka@
Diffstat (limited to 'lib/libedit/refresh.c')
| -rw-r--r-- | lib/libedit/refresh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libedit/refresh.c b/lib/libedit/refresh.c index f2d001d67cb..f9ba18d2a8f 100644 --- a/lib/libedit/refresh.c +++ b/lib/libedit/refresh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: refresh.c,v 1.21 2017/07/26 12:10:56 schwarze Exp $ */ +/* $OpenBSD: refresh.c,v 1.22 2018/10/11 15:19:09 millert Exp $ */ /* $NetBSD: refresh.c,v 1.50 2016/05/02 16:35:17 christos Exp $ */ /*- @@ -1083,7 +1083,7 @@ re_fastputc(EditLine *el, wint_t c) el->el_display[i - 1] = lastline; } else { el->el_cursor.v++; - lastline = el->el_display[el->el_refresh.r_oldcv++]; + lastline = el->el_display[++el->el_refresh.r_oldcv]; } re__copy_and_pad(lastline, L"", el->el_terminal.t_size.h); |
