Skip to content

Commit 0714713

Browse files
committed
Fix for issue robbiehanson#147 - analyzer warning
1 parent a48c4bd commit 0714713

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

GCD/GCDAsyncSocket.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6031,10 +6031,17 @@ - (void)ssl_startTLS
60316031
LogTrace();
60326032

60336033
LogVerbose(@"Starting TLS (via SecureTransport)...");
6034-
6034+
60356035
OSStatus status;
60366036

60376037
GCDAsyncSpecialPacket *tlsPacket = (GCDAsyncSpecialPacket *)currentRead;
6038+
if (tlsPacket == nil) // Code to quiet the analyzer
6039+
{
6040+
NSAssert(NO, @"Logic error");
6041+
6042+
[self closeWithError:[self otherError:@"Logic error"]];
6043+
return;
6044+
}
60386045
NSDictionary *tlsSettings = tlsPacket->tlsSettings;
60396046

60406047
// Create SSLContext, and setup IO callbacks and connection ref

0 commit comments

Comments
 (0)