30.08.2011, 13:12
It's because you have specified 512 cells in the format function, so it continues writing to memory even though you don't have any memory allocated, which is a buffer overflow.
http://en.wikipedia.org/wiki/Buffer_overflow
http://en.wikipedia.org/wiki/Buffer_overflow