Enforce null termination on incoming strings