Subject: Re: CVS commit: src/sys
To: Charles M. Hannum <abuse@spamalicious.com>
From: Klaus Klein <kleink@mibh.de>
List: tech-kern
Date: 04/24/2004 22:03:59
On Saturday 24 April 2004 21:24, Charles M. Hannum wrote:
> Silent truncation is virtually never the right answer.  It just causes the 
> code to do the wrong thing in a different way.

I won't disagree with this.  But considering the piece of mail you're
responding to, let me clarify its last paragraph:

> > It won't bite you in the truncating invocation, but there's no way
> > to avoid it in the subsequent ones.

This was not a statement about truncation itself but about the particular
(and repeatedly suggested) misuse of snprintf() which unintentionally
ignores truncation and overrun despite appearing to handle that condition.


- Klaus