2007-08-28

The Monthly OMG

I bet this blog, while still being kept more-or-less in secret, has already managed to make some people angry. Here's another try.

This is a report from a code analysis from hell (or from N*). Suppose you pass a pointer to a buffer to some routine, which has to fill up the buffer. But, alas, you are not interested in the first 8 header bytes of the data. What do you do?

Here's what KY did: you allocate a buffer
p = new char[manyBytes]
, and pass p-8 to the routine.

1 comment:

Artyom said...

That what happens to programmers
that learn Java/C#/Perl/Python
or any other of "Smart Languages"
at the beginning.