diff options
author | 2020-05-29 20:46:13 +0000 | |
---|---|---|
committer | 2020-05-29 20:46:13 +0000 | |
commit | d0e5c0ea53c939a69ea4216ece58b9f73c471c22 (patch) | |
tree | 54cdff780d000003d0c2357b8387b7ea2b221058 /lib | |
parent | Adjust some PPC ELF code to return -1 instead of doing pointer (diff) | |
download | wireguard-openbsd-d0e5c0ea53c939a69ea4216ece58b9f73c471c22.tar.xz wireguard-openbsd-d0e5c0ea53c939a69ea4216ece58b9f73c471c22.zip |
Add a fix from ncurses 20200523 via Hiltjo Posthuma that prevents
ncurses passing strings to tputs() that look like BSD padding when using
the rep terminfo(5) capability (with BSD_TPUTS which we and upstream
both have enabled). Upstream change:
+ add a check in EmitRange to guard against repeat_char emitting digits
which could be interpreted as BSD-style padding when --enable-bsdpad
is configured (report/patch by Hiltjo Posthuma).
ok millert
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcurses/tty/tty_update.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/libcurses/tty/tty_update.c b/lib/libcurses/tty/tty_update.c index bd2f088adf6..cbc114e1e2f 100644 --- a/lib/libcurses/tty/tty_update.c +++ b/lib/libcurses/tty/tty_update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_update.c,v 1.16 2010/01/12 23:22:07 nicm Exp $ */ +/* $OpenBSD: tty_update.c,v 1.17 2020/05/29 20:46:13 nicm Exp $ */ /**************************************************************************** * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * @@ -80,7 +80,7 @@ #include <ctype.h> #include <term.h> -MODULE_ID("$Id: tty_update.c,v 1.16 2010/01/12 23:22:07 nicm Exp $") +MODULE_ID("$Id: tty_update.c,v 1.17 2020/05/29 20:46:13 nicm Exp $") /* * This define controls the line-breakout optimization. Every once in a @@ -540,7 +540,11 @@ EmitRange(const NCURSES_CH_T * ntext, int num) } else { return 1; /* cursor stays in the middle */ } - } else if (repeat_char && runcount > SP->_rep_cost) { + } else if (repeat_char && +#if BSD_TPUTS + !isdigit(UChar(CharOf(ntext0))) && +#endif + runcount > SP->_rep_cost) { bool wrap_possible = (SP->_curscol + runcount >= screen_columns); int rep_count = runcount; |