Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in dataFromBase64String #7

Open
benweiss opened this issue Mar 12, 2015 · 0 comments
Open

Crash in dataFromBase64String #7

benweiss opened this issue Mar 12, 2015 · 0 comments

Comments

@benweiss
Copy link

If the input string contains no valid base64 data, this routine will crash. For instance: if the input is a string containing just spaces (and thus no valid base64 data), then NewBase64Decode() returns a valid pointer but an invalid (-1) length. dataFromBase64String() subsequently tries to allocate a NSData block of size (-1), which crashes. This situation should be checked for and handled appropriately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant