summaryrefslogtreecommitdiff
path: root/usr/src/lib/libcurses/screen/whline.c
diff options
context:
space:
mode:
authormuffin <none@none>2005-08-18 18:04:45 -0700
committermuffin <none@none>2005-08-18 18:04:45 -0700
commitfbfd105d0c38ec23cf92df531ace2c1719b48098 (patch)
treeeadd6e06a0092880b7a207248605e72a57d8ca83 /usr/src/lib/libcurses/screen/whline.c
parent852f01396448f85461deb2e7039a60a0d9274d68 (diff)
downloadillumos-joyent-fbfd105d0c38ec23cf92df531ace2c1719b48098.tar.gz
5027709 whline() and wvline() may cause SEGV.
4503183 box() causes SEGV 5089079 delterm() dereferences a freed pointer
Diffstat (limited to 'usr/src/lib/libcurses/screen/whline.c')
-rw-r--r--usr/src/lib/libcurses/screen/whline.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/src/lib/libcurses/screen/whline.c b/usr/src/lib/libcurses/screen/whline.c
index 0e033d9ae4..be9632cddf 100644
--- a/usr/src/lib/libcurses/screen/whline.c
+++ b/usr/src/lib/libcurses/screen/whline.c
@@ -20,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 1997 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -52,8 +52,8 @@ whline(WINDOW *win, chtype horch, int num_chars)
if (num_chars <= 0)
return (ERR);
- if (num_chars > win->_maxx - curx + 1)
- num_chars = win->_maxx - curx + 1;
+ if (num_chars > win->_maxx - curx)
+ num_chars = win->_maxx - curx;
if (horch == 0)
horch = ACS_HLINE;
a = _ATTR(horch);