On Wed, Dec 3, 2014 at 1:04 PM, John Ames <commodorejohn at gmail.com> wrote:
> From: Al Kossow <aek at bitsavers.org>
> People traded safety for speed, and thanks to the net and cowboy
> programming, that has turned out to be a bad decision.
Pshaw. C is only as unsafe as you make it. It's
not the language that
has caused, for example, Internet security issues - it's programmers
who refuse to learn well-known lessons like "always, always, *always*
bounds-check network-facing buffers *no matter what*" that give us
things like Heartbleed and any number of other overrun/underrun/etc.
vulnerabilities.
In other words, in C the programmer has to take positive action to
achieve bounds checking, which in some other languages can be
done with no special effort by the programmer.
That doesn't sound to me like "C is only as unsafe as you make it".
Rather, it sounds like "C is only as safe as you make it".
Your argument is that a sufficiently good programmer will always
write proper checks, etc. Reality doesn't bear that out.
Blaming the language for the badness of bad
programmers is like
blaming the chainsaw for the actions of some nitwit who decapitated
himself playing with one.
C is a chainsaw that is not supplied with any of the safety features of
a normal chainsaw. It is a chainsaw that would be unlawful to
sell in the US.