summaryrefslogtreecommitdiff
path: root/usr/src/lib/libcurses/screen/wvline.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/wvline.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/wvline.c')
-rw-r--r--usr/src/lib/libcurses/screen/wvline.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr/src/lib/libcurses/screen/wvline.c b/usr/src/lib/libcurses/screen/wvline.c
index 0fb238ce2a..e984eee02f 100644
--- a/usr/src/lib/libcurses/screen/wvline.c
+++ b/usr/src/lib/libcurses/screen/wvline.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.
*/
@@ -49,14 +49,14 @@ wvline(WINDOW *win, chtype vertch, int num_chars)
{
short cury = win->_cury, curx = win->_curx;
chtype a, **fp = win->_y;
- short *firstch = &(win->_firstch[cury]),
- *lastch = &(win->_lastch[cury]);
+ short *firstch = &(win->_firstch[cury]);
+ short *lastch = &(win->_lastch[cury]);
if (num_chars <= 0)
return (ERR);
- if (num_chars > win->_maxy - cury + 1)
- num_chars = win->_maxy - cury + 1;
+ if (num_chars > win->_maxy - cury)
+ num_chars = win->_maxy - cury;
if (vertch == 0)
vertch = ACS_VLINE;
a = _ATTR(vertch);