avoid potential memory leakage.

If not packing '\0' into the message then maybe we should be careful when strcpy() between strings. Current implementation may cause memory leakage somehow?