Subject: bin/12958: problem report
To: None <>
From: None <>
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
>Originator:     NAGAI Yutaka
>Release:        1.3.3
The University of Electro-Commnications
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

	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.

	See lpr.c and the manual pages of printcap

	Change definition of buf in lpr.c