Email List: Xaustin-review-lX
[All Lists]

Re: Defect in XSH asctime()

To: yyyyyyyyyyyyyyy@xxxxxxx, yyyyy@xxxxxxxxx
Subject: Re: Defect in XSH asctime()
From: Robbin Kawabata <yyyyyyyyyyyyyyy@xxxxxxxxxxx>
Date: Tue, 16 Dec 2003 12:21:44 -0800 (PST)
Cc: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
> From: "Clive D.W. Feather" <yyyyy@xxxxxxxxx>
> yyyyyyyyyyyyyyy@xxxxxxx said:
> > If asctime() is called with a tm structure whose tm_year field results
> > in a year > 9999 (which is possible with 64-bit time_t), the current
> > specification of asctime() would result in asctime() to overrunning a
> > 26-character buffer;  the specification says the sprintf() format
> > for printing the year is "%d", and (eg) a 5-digit number would print
> > 5 characters, overrunning the buffer.
> 
> WG14 examined this issue quite a long time ago. We decided that the
> behaviour was simply undefined. There is no requirement that a particular
> string appear in the buffer, or even that the function call returns in a
> sensible state (or at all). It's *UNDEFINED*.

I would like to read the WG14 discussion on asctime() and review it 
with my group.  However, due to vacations this may be delayed until after 
the new year.

Robbin Kawabata

<Prev in Thread] Current Thread [Next in Thread>