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/whline.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr/src/lib/libcurses/screen/whline.c') 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); -- cgit v1.2.3