Recently, I was looking at a bug report for an error that would only happen on one operating system.

When I looked at the code… I had wondered why no one called this one out:

char buffer[128] = {0};

// Some code here

memcpy ( buffer, another_buffer, 128 );

// Some more code

free (buffer);

Right off the bat I said… what?!

3 Comments

Leave a Reply