Applying the Buffer Overflow patch

Prevent reading past message buffers and crashing then.

Original patch: NickyP from the Firestorm team