Because you're calling ZeroMemory() on a buffer of only 3 chars and telling it to zero out 4.

BTW, this is the C section, and that's C++ code.