Subject: lib/1419: 'ansi' termcap entry > 1024
To: None <gnats-bugs@NetBSD.ORG>
From: None <abs@mono.city.ac.uk>
List: netbsd-bugs
Date: 08/29/1995 13:56:00
>Number:         1419
>Category:       lib
>Synopsis:       'ansi' termcap entry > 1024
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 29 09:20:02 1995
>Last-Modified:
>Originator:     David Brownlee
>Organization:
Monochrome
>Release:        Aug 22th 1995
>Environment:
sparc, 1.0A, current
System: NetBSD gluon.city.ac.uk 1.0A NetBSD 1.0A (GLUON) #1: monoadm@gluon.city.ac.uk:/mono/u1/NetBSD/src/sys/arch/sparc/compile/GLUON sparc

>Description:
	The ansi termcap entry overflows a 1024 byte buffer when used with
	tgetent(), tgetstr() etc...
>How-To-Repeat:
	Run a program that uses tgetent() into a 1024 byte buffer & watch
	the end get scribbled over (it was the stack in my case :(
>Fix:

    	One of:

	1) Use 1200 byte buffers (Ok ok, only kidding)
	2) Fix the termcap code to not overflow the buffer.
	3) Switch the system to ncurses & terminfo.
>Audit-Trail:
>Unformatted: