From syssgm@devetir.qld.gov.au  Fri Sep 15 23:00:23 1995
Received: from bunyip.cc.uq.oz.au (pp@bunyip.cc.uq.oz.au [130.102.2.1])
          by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id XAA29846
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 15 Sep 1995 23:00:20 -0700
Received: from cc.uq.oz.au by bunyip.cc.uq.oz.au 
          id <29558-0@bunyip.cc.uq.oz.au>; Sat, 16 Sep 1995 16:00:02 +1000
Received: from stupid.devetir.qld.gov.au 
          by pandora.devetir.qld.gov.au (8.6.10/DEVETIR-E0.3a) with ESMTP 
          id QAA19921; Sat, 16 Sep 1995 16:04:38 +1000
Received: (from syssgm@localhost) by stupid.devetir.qld.gov.au (8.6.12/8.6.9) 
          id PAA02308; Sat, 16 Sep 1995 15:42:30 +1000
Message-Id: <199509160542.PAA02308@stupid.devetir.qld.gov.au>
Date: Sat, 16 Sep 1995 15:42:30 +1000
From: Stephen McKay <syssgm@devetir.qld.gov.au>
Sender: syssgm@devetir.qld.gov.au
Reply-To: syssgm@devetir.qld.gov.au
To: FreeBSD-gnats-submit@freebsd.org
Cc: syssgm@devetir.qld.gov.au
Subject: Off-by-one error in wbkgd() in ncurses
X-Send-Pr-Version: 3.2

>Number:         722
>Category:       bin
>Synopsis:       Off-by-one error in wbkgd() in ncurses
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 15 23:10:01 PDT 1995
>Closed-Date:    Wed Apr 10 23:45:48 PDT 1996
>Last-Modified:  Wed Apr 10 23:46:37 PDT 1996
>Originator:     Paul Koch
>Release:        FreeBSD 2.2-CURRENT i386
>Organization:
>Environment:

	FreeBSD 2.0.5 on a 16Mb 486DX50

>Description:

	[ I'm posting this for Paul Koch, who has no net connection. ]

	I found when using the ncurses library call 'wbkgd', the entire
	background was not being painted properly. eg on a 80*25 window,
	the last column and last line were being painted incorrectly.

>How-To-Repeat:

>Fix:

*** libncurses/lib_bkgd.c.old	Mon Sep  4 12:56:29 1995
--- libncurses/lib_bkgd.c	Mon Sep  4 12:57:11 1995
***************
*** 25,32 ****
  int x, y;
  
  	T(("wbkgd(%x, %x) called", win, ch));
! 	for (y = 0; y < win->_maxy; y++)
! 		for (x = 0; x < win->_maxx; x++)
  			if (win->_line[y][x]&A_CHARTEXT == ' ')
  				win->_line[y][x] |= ch;
  			else
--- 25,32 ----
  int x, y;
  
  	T(("wbkgd(%x, %x) called", win, ch));
! 	for (y = 0; y <= win->_maxy; y++)
! 		for (x = 0; x <= win->_maxx; x++)
  			if (win->_line[y][x]&A_CHARTEXT == ' ')
  				win->_line[y][x] |= ch;
  			else

EOF
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: scrappy 
State-Changed-When: Wed Apr 10 23:45:48 PDT 1996 
State-Changed-Why:  
patch committed to -stable source tree 
>Unformatted:
