Well, I'm all patched up... but this is getting kinda silly.
I mean, I've written a lot of C and C++ code in my time, and from day one I've coded certain things certain ways... forming habits that I couldn't shake if I wanted to.
On of those is ALWAYS checking my buffers. If I ever use a function that takes in a pointer and copies stuff to that memory location, I ALWAYS declare a nice constant at the top of the function that has the max length of stuff I will copy into that array. I use that constant when I declare the array, and when I pass it anywhere. Furthermore, if I'm doing dynmaic sizing of an array, I take similar precautions.
Microsoft needs to find the people responsible for this, give them a second chance, but if it ever happens again... fire them. It's as simple as that. If you're so careless as to leave an unchecked buffer in your code... even after this big MS security crackdown (although this was before that... so many you should get 2 extra chances... eheh), then you don't deserve to work at Microsoft.
Thankfully, I've long since left the world of unmanaged code... I can be blissfully ignorant of such matters when coding Java or any .NET language... or VB for that matter.
|