On Wed, 9 Jan 2008 23:39:50 -0500
"David Higgs" <[EMAIL PROTECTED]> wrote:

> On Jan 9, 2008 11:25 PM, Duncan Patton a Campbell <[EMAIL PROTECTED]> wrote:
...
> > > Thanks,
> > > Dhu
> 
> man 3 strftime
> 
> The maxsize parameter is the buffer size _including_ terminating NUL,
> so the bug is yours.
> 

Ya.  The null-terminator is written _into_ the string, not at the end of it...

Dhu

> Also note the BUGS section which warns that other implementations may
> not NUL-terminate the string if the length is not large enough.
> Sounds like the standard wasn't specific enough.
> 
> --david

Reply via email to