From fbfd105d0c38ec23cf92df531ace2c1719b48098 Mon Sep 17 00:00:00 2001 From: muffin Date: Thu, 18 Aug 2005 18:04:45 -0700 Subject: 5027709 whline() and wvline() may cause SEGV. 4503183 box() causes SEGV 5089079 delterm() dereferences a freed pointer --- usr/src/lib/libcurses/screen/wvline.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'usr/src/lib/libcurses/screen/wvline.c') 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); -- cgit v1.2.3