NSData's initWithBase64EncodedString:options: method crash when nil is passed as string parameter
| Originator: | roguescroll | ||
| Number: | rdar://16366661 | Date Originated: | 03/19/2014 |
| Status: | Open | Resolved: | No |
| Product: | iOS SDK | Product Version: | iOS 7.0 |
| Classification: | NSData | Reproducible: | Yes |
Issue: While using the NSData's initWithBase64EncodedString:options: method, when we pass in nil as the string parameter, the application crashes with NSInvalidArgumentException. The documentation - https://developer.apple.com/library/ios/documentation/cocoa/reference/foundation/classes/NSData_Class/Reference/Reference.html#//apple_ref/occ/instm/NSData/initWithBase64EncodedString:options: does not mention that nil should not be passed in as a parameter. Expected: The documentation should mention that nil should not be passed in as the string parameter.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!