Subject: PR/34055 CVS commit: src/bin/date
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Christos Zoulas <christos@netbsd.org>
List: netbsd-bugs
Date: 07/23/2006 20:40:02
The following reply was made to PR bin/34055; it has been noted by GNATS.

From: Christos Zoulas <christos@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/34055 CVS commit: src/bin/date
Date: Sun, 23 Jul 2006 20:39:10 +0000 (UTC)

 Module Name:	src
 Committed By:	christos
 Date:		Sun Jul 23 20:39:10 UTC 2006
 
 Modified Files:
 	src/bin/date: date.c
 
 Log Message:
 PR/34055: Kevin Massey: Date uses a fixed 1K buffer for strftime
 but does not check when strftime fails because the buffer is too small.
 Our implementation of strftime does not NUL terminat the buffer
 on failure (it does not have to; the results are undefined), so
 garbage gets printed. Use a dynamically allocated buffer instead.
 
 
 To generate a diff of this commit:
 cvs rdiff -r1.42 -r1.43 src/bin/date/date.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.