iOS AppRTCMobile: Fix SocketRocket bug
Fixes a bug where a missing boolean-not causes AppRTCMobile to always crash on an assert when built for Debug. BUG=None NOTRY=True TBR=magjed@webrtc.org Review-Url: https://codereview.webrtc.org/2721583002 Cr-Commit-Position: refs/heads/master@{#16865}
This commit is contained in:
parent
b3ebc1aa59
commit
99ce6cdf23
@ -504,7 +504,7 @@ static __strong NSData *CRLFCRLF;
|
||||
CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Host"), (__bridge CFStringRef)(_url.port ? [NSString stringWithFormat:@"%@:%@", _url.host, _url.port] : _url.host));
|
||||
|
||||
NSMutableData *keyBytes = [[NSMutableData alloc] initWithLength:16];
|
||||
BOOL success = SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes);
|
||||
BOOL success = !SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes);
|
||||
assert(success);
|
||||
|
||||
if ([keyBytes respondsToSelector:@selector(base64EncodedStringWithOptions:)]) {
|
||||
@ -1362,7 +1362,7 @@ static const size_t SRFrameHeaderOverhead = 32;
|
||||
}
|
||||
} else {
|
||||
uint8_t *mask_key = frame_buffer + frame_buffer_size;
|
||||
BOOL success = SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key);
|
||||
BOOL success = !SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key);
|
||||
assert(success);
|
||||
frame_buffer_size += sizeof(uint32_t);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user