Don't bother refactoring. Let's just replace it with `xstrndup` gradually in the codebase.