Insecure Programming by example

E

Eric Sosman

Richard said:
(e-mail address removed) said:




I looked at the first example. Anyone programming like that needs a good
kicking.

It's interesting that the example indulges in undefined
behavior (twice!) before arriving at what was probably the
point it was trying to make. One doesn't know whether the
author deserves praise or blame.
 
B

bluejack

Eric said:
It's interesting that the example indulges in undefined
behavior (twice!) before arriving at what was probably the
point it was trying to make. One doesn't know whether the
author deserves praise or blame.

Similarly, all the argc and argv parameter conventions are reversed; is
that ignorance? or some sort of erudite gotcha for improperly trained
applicants? The whole thing feels like a red herring: which of the many
objectionable elements am I *supposed* to be objecting to... ?
 
R

Richard Heathfield

(e-mail address removed) said:

I have the very greatest of respect for David Wagner's cryptographic skills.
I would not ask him to write C code for me. (Sorry, David, if you ever read
this!)

Whoever wrote that needs a good kicking. Here's a quote:

++++
A format string is an ASCIIZ string that contains text and format parame-
ters.Example:

printf ("The magic number is: %s\n", 1911);
++++

In this tiny fragment, which is the first significant bit of C code in the
document, I count two oopses - one in the text and one in the code. Oops.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top