Defend against specially-crafted vulnerable messages.

Mainly PR'ing because it's important enough to not forget about - This approach works but I need to do some serious testing, it's also just a tiny bit messy.

I've written a program that can crash any version of KMPServer, but for obvious reasons I'm not releasing it. :P