Pergunta de entrevista da empresa ArcSoft

How to detect the allocated memory is overwritten?