added buffer overflow hook