From nobody@FreeBSD.org  Thu Aug 23 17:48:47 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B6190106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 23 Aug 2012 17:48:47 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id A1EAE8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 23 Aug 2012 17:48:47 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q7NHmldd097174
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 23 Aug 2012 17:48:47 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q7NHmlm2097173;
	Thu, 23 Aug 2012 17:48:47 GMT
	(envelope-from nobody)
Message-Id: <201208231748.q7NHmlm2097173@red.freebsd.org>
Date: Thu, 23 Aug 2012 17:48:47 GMT
From: Daniel Tso <dantso@hotmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: calendar(1) core dumps with minor input format deviations
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         170930
>Category:       bin
>Synopsis:       calendar(1) core dumps with minor input format deviations
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    edwin
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 23 17:50:06 UTC 2012
>Closed-Date:    
>Last-Modified:  Fri Nov 23 09:50:02 UTC 2012
>Originator:     Daniel Tso
>Release:        8.3
>Organization:
SUNY Upstate Medical University
>Environment:
FreeBSD tsolab.org 8.3-RELEASE FreeBSD 8.3-RELEASE #0: Mon Apr  9 21:47:23 UTC 2
012     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Calendar(1) takes as input a file "calendar" in the current directory, of the form:

01/23     Event text

meaning the date, 01 (January), day of month (23rd).

If instead one puts extraneous text in the date field, calendar core dumps, e.g.

01/23/2012 Event text for the year 2012

Previous versions of calendar(1) did not have this behavior (I don't know the exact version of the change, but definitely calendar(1) from FreeBSD 5.1 did not have this problem -- it just ignores text after the day subfield.
>How-To-Repeat:
$ cat > calendar
8/23     hello there
^D
$ calendar
Aug 23  hello there
$ cat > calendar
8/23/2012  hello there core file
^D
$ calendar
Segmentation fault (core dumped)
$

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->edwin 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Aug 23 18:31:56 UTC 2012 
Responsible-Changed-Why:  
Edwin, are you still interested in these bugs? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170930 

From: Jaakko Heinonen <jh@FreeBSD.org>
To: bug-followup@FreeBSD.org, dantso@hotmail.com
Cc:  
Subject: Re: bin/170930: calendar(1) core dumps with minor input format
 deviations
Date: Fri, 23 Nov 2012 11:44:38 +0200

 It seems that this has been fixed in head and stable/9. I did only quick
 testing.
 
 -- 
 Jaakko
>Unformatted:
