Check CFStringTransform() call for success before using result #1867

merged 1 commit into from Mar 5, 2014

2 participants


CFStringTransform returns a Boolean to report success/failure, and the string should probably only be used on success. Assuming CFStringTransform is well-behaved, the end result is likely the same.

In any case, our lovely security analysis tool flagged this as a must-fix failure to check error conditions before using a function result, so it seemed worth a pull request.

See matching request #1866 for the 1.x branch.

@mattt mattt merged commit 5a6ad27 into AFNetworking:master Mar 5, 2014

1 check passed

Details default The Travis CI build passed

This makes a lot of sense. Thanks for the change @CFKevinRef—I really appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment