Skip to content

Commit 052cdc9

Browse files
committed
Bugfix - Crash if NSNull is set for key kCFStreamSSLPeerName in startTLS dictionary.
1 parent d0c180c commit 052cdc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

GCD/GCDAsyncSocket.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5472,7 +5472,7 @@ - (void)maybeStartTLS
54725472
// 1. kCFStreamSSLPeerName
54735473

54745474
value = [tlsSettings objectForKey:(NSString *)kCFStreamSSLPeerName];
5475-
if (value)
5475+
if ([value isKindOfClass:[NSString class]])
54765476
{
54775477
NSString *peerName = (NSString *)value;
54785478

0 commit comments

Comments
 (0)