Current-Users archive

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

Re: Possible unsafe use of strncat in sbin/sysctl/sysctl.c

On Wed, Aug 24, 2011 at 12:03:47AM +0200, Marc Balmer wrote:
 > > It's an artifact of our stupid lint(1).
 > > 
 > > > Some folks seems to (void)love it.
 > > 
 > > Not that I know of...
 > So is the policy to (void)pollute our sources because of a defect in a
 > tool?

That's been the policy going back long before NetBSD existed, when no
other alternative to lint existed and doing without it would have been
highly unwise.

 > Or are we sane and brave and ignore lint(1)?

It still has some value. What we should do, however, is fix or replace
it. I vote for the latter; the existing code is nearly unmaintainable.

 > I see a tendency to "fix^wfuckup" correct code just to appease incorrect
 > tools, may that be lint or gcc.  We have become slaves to the machine ... ;)

Writing serious code for a while in a dynamically typed language will
give you a new appreciation for the value of static program checking.

David A. Holland

Home | Main Index | Thread Index | Old Index