Make sure strings are serialized NULL-terminated.