Subject: bin/12958: problem report
To: None <gnats-bugs@gnats.netbsd.org>
From: None <nagai@hc.uec.ac.jp>
List: netbsd-bugs
Date: 05/16/2001 13:10:38
>Number:         12958
>Category:       bin
>Synopsis:       potential problem of lpr source code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 16 01:41:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     NAGAI Yutaka
>Release:        1.3.3
>Organization:
The University of Electro-Commnications
>Environment:
System: NetBSD bacchus 1.3.3 NetBSD 1.3.3 (BACCHUS) #1: Wed Aug 25 18:31:45 JST 1999 nagai@bacchus:/usr/src/sys/arch/sparc/compile/BACCHUS sparc


>Description:
	In lpr.c, a function copy use buffer defined by "char
buf[MAXPATHLEN];". But this definition should be "char buf[BUFSIZ];"
according to the description of 'mx' in the manual pages of printcap.
Because current definitions of MAXPATHLEN and BUFSIZ are same value '
1024', so no problem will occur. But if these definitions are changed,
the buffer limit will not agree with printcap description.

>How-To-Repeat:
	See lpr.c and the manual pages of printcap

>Fix:
	Change definition of buf in lpr.c
>Release-Note:
>Audit-Trail:
>Unformatted: