Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: webrtc/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m

Issue 2721583002: iOS AppRTCMobile: Fix SocketRocket bug (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m
diff --git a/webrtc/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m b/webrtc/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m
index fe76e6328096952aca766ba5ac73657b35a7b602..45f783feb33724ca71179069728f322c52205fd9 100644
--- a/webrtc/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m
+++ b/webrtc/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m
@@ -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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698