Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/i386



On Wed, Apr 21, 2004 at 11:35:37PM -0400, Bill Squier wrote:
> On Thu, Apr 22, 2004 at 12:34:52AM +0000, Jun-ichiro itojun Hagino wrote:
> > 
> > Log Message:
> > sprintf -> snprintf
> > 
> 
> 
> I have decided to further secure NetBSD by changing all the instances of
> the word 'sprintf' in your log messages to 'snprintf'.
> 
> All kidding aside, don't you feel that some of these changes are a waste of
> your valuable time?  Many of these changes are in device drivers where the
> lengths of these items are fixed.

If I understand some of Itojun's past comments, I think the idea is not 
that the code is vulnerable, but the idea to have all examples be safe 
ones. So that when future programmers copy code, they always see safe 
examples.

However I wonder if we really should do this. If the only reason code is 
safe is that the programmer only had "safe" examples, then we don't have 
true understanding, we have security through luck.

Take care,

Bill

Attachment: pgpMQ9gONqsZE.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index