Title: [97807] trunk/Source/WebKit2
Revision
97807
Author
[email protected]
Date
2011-10-18 16:14:48 -0700 (Tue, 18 Oct 2011)

Log Message

        [WK2] Crash after storing credentials in Keychain
        https://bugs.webkit.org/show_bug.cgi?id=70376
        <rdar://problem/9647503>

        Reviewed by Dan Bernstein.

        * Shared/mac/SecKeychainItemResponseData.cpp:
        (WebKit::SecKeychainItemResponseData::encode):
        (WebKit::SecKeychainItemResponseData::decode):
        Actually send keychain item over, too. In shimSecKeychainItemCreateFromContent(), we are
        going to use it to override SecKeychainItemCreateFromContent(), and we cannot return noErr
        from this function without returning a non-null keychain item.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (97806 => 97807)


--- trunk/Source/WebKit2/ChangeLog	2011-10-18 23:08:56 UTC (rev 97806)
+++ trunk/Source/WebKit2/ChangeLog	2011-10-18 23:14:48 UTC (rev 97807)
@@ -1,3 +1,18 @@
+2011-10-18  Alexey Proskuryakov  <[email protected]>
+
+        [WK2] Crash after storing credentials in Keychain
+        https://bugs.webkit.org/show_bug.cgi?id=70376
+        <rdar://problem/9647503>
+
+        Reviewed by Dan Bernstein.
+
+        * Shared/mac/SecKeychainItemResponseData.cpp:
+        (WebKit::SecKeychainItemResponseData::encode):
+        (WebKit::SecKeychainItemResponseData::decode):
+        Actually send keychain item over, too. In shimSecKeychainItemCreateFromContent(), we are
+        going to use it to override SecKeychainItemCreateFromContent(), and we cannot return noErr
+        from this function without returning a non-null keychain item.
+
 2011-10-18  Damian Kaleta  <[email protected]>
 
         This revised fix doesn't break SL build.

Modified: trunk/Source/WebKit2/Shared/mac/SecKeychainItemResponseData.cpp (97806 => 97807)


--- trunk/Source/WebKit2/Shared/mac/SecKeychainItemResponseData.cpp	2011-10-18 23:08:56 UTC (rev 97806)
+++ trunk/Source/WebKit2/Shared/mac/SecKeychainItemResponseData.cpp	2011-10-18 23:14:48 UTC (rev 97807)
@@ -72,6 +72,10 @@
     encoder->encodeBool(m_data.get());
     if (m_data)
         CoreIPC::encode(encoder, m_data.get());
+
+    encoder->encodeBool(m_keychainItem.get());
+    if (m_keychainItem)
+        CoreIPC::encode(encoder, m_keychainItem.get());
 }
 
 bool SecKeychainItemResponseData::decode(CoreIPC::ArgumentDecoder* decoder, SecKeychainItemResponseData& secKeychainItemResponseData)
@@ -105,6 +109,13 @@
     if (expectData && !CoreIPC::decode(decoder, secKeychainItemResponseData.m_data))
         return false;
 
+    bool expectItem;
+    if (!decoder->decodeBool(expectItem))
+        return false;
+
+    if (expectItem && !CoreIPC::decode(decoder, secKeychainItemResponseData.m_keychainItem))
+        return false;
+
     return true;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to