A fix from a security static analysis

Fix the remaining case in which getCString:maxLength:encoding is not checked for returning NO before using the result.