This should be before the length check, otherwise we might write beyond the allocated length in cv_namestring.