Title: [233340] trunk/Source/WebKit
Revision
233340
Author
[email protected]
Date
2018-06-28 16:57:01 -0700 (Thu, 28 Jun 2018)

Log Message

Add nullptr check for xpc_connection_t in AuthenticationManager::initializeConnection
https://bugs.webkit.org/show_bug.cgi?id=187110
<rdar://problem/41536815>

Reviewed by Brent Fulgham.

In some rare cases as shown by crash tracers that the passed xpc_connection_t object could be nullptr,
and xpc_connection_set_event_handler won't do the nullptr check on its parameters. Therefore, we should
do it by ourselves.

* Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
(WebKit::AuthenticationManager::initializeConnection):
* UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm:
(WebKit::AuthenticationChallengeProxy::sendClientCertificateCredentialOverXpc const):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (233339 => 233340)


--- trunk/Source/WebKit/ChangeLog	2018-06-28 23:52:57 UTC (rev 233339)
+++ trunk/Source/WebKit/ChangeLog	2018-06-28 23:57:01 UTC (rev 233340)
@@ -1,3 +1,20 @@
+2018-06-28  Jiewen Tan  <[email protected]>
+
+        Add nullptr check for xpc_connection_t in AuthenticationManager::initializeConnection
+        https://bugs.webkit.org/show_bug.cgi?id=187110
+        <rdar://problem/41536815>
+
+        Reviewed by Brent Fulgham.
+
+        In some rare cases as shown by crash tracers that the passed xpc_connection_t object could be nullptr,
+        and xpc_connection_set_event_handler won't do the nullptr check on its parameters. Therefore, we should
+        do it by ourselves.
+
+        * Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
+        (WebKit::AuthenticationManager::initializeConnection):
+        * UIProcess/Authentication/cocoa/AuthenticationChallengeProxyCocoa.mm:
+        (WebKit::AuthenticationChallengeProxy::sendClientCertificateCredentialOverXpc const):
+
 2018-06-28  Wenson Hsieh  <[email protected]>
 
         [iOS] DataTransfer.getData always returns the empty string when dropping text

Modified: trunk/Source/WebKit/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm (233339 => 233340)


--- trunk/Source/WebKit/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm	2018-06-28 23:52:57 UTC (rev 233339)
+++ trunk/Source/WebKit/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm	2018-06-28 23:57:01 UTC (rev 233340)
@@ -40,7 +40,7 @@
 {
     ASSERT(isMainThread());
 
-    if (!connection || xpc_get_type(connection->xpcConnection()) != XPC_TYPE_CONNECTION) {
+    if (!connection || !connection->xpcConnection()) {
         ASSERT_NOT_REACHED();
         return;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to