| | | |------------------|-----------------| |Previous ID | SR-2666 | |Radar | None | |Original Reporter | @johnno1962 | |Type | Bug | |Status | Closed | |Resolution | Done | <details> <summary>Additional Detail from JIRA</summary> | | | |------------------|-----------------| |Votes | 0 | |Component/s | Foundation | |Labels | Bug | |Assignee | @johnno1962 | |Priority | Medium | md5: e7ebf0e1d370230c4351c00395881ddc </details> **Issue Description:** During the port to Android of Foundation <https://github.com/apple/swift-corelibs-foundation/pull/622> I was seeing a crash in CFStringGetCString when called for zero length strings (bufferSize == 1) and had to put some defensive code around it <https://github.com/SwiftJava/swift-corelibs-foundation/blob/master/CoreFoundation/Base.subproj/CFUtilities.c#L790.> Was crashing at line <https://github.com/SwiftJava/swift-corelibs-foundation/blob/master/CoreFoundation/String.subproj/CFString.c#L2182.>