An example of "buffer overflow" vulnerability:
The solution (3)

Oops!

Did I say that there was only one bug?

I lied, of course. That was only to underscore the third moral of the exercise:

Never trust the programmer's word!

OK, so where is the bug?

Sorry, there's no cheating for this one---if you want an explanation, you'll have to find it.

Last edited on 2010-10-17 17:02:36 by stolfi