Changeset 246648 in webkit
- Timestamp:
- Jun 20, 2019, 1:06:49 PM (7 years ago)
- Location:
- branches/safari-607-branch/Source/WebKit
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
Shared/cf/ArgumentCodersCF.cpp (modified) (2 diffs)
-
Shared/mac/SecItemResponseData.cpp (modified) (1 diff)
-
UIProcess/mac/SecItemShimProxy.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-607-branch/Source/WebKit/ChangeLog
r246377 r246648 1 2019-06-19 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r245911. rdar://problem/51656609 4 5 Network process crash when decoding SecItemResponseData 6 https://bugs.webkit.org/show_bug.cgi?id=198388 7 <rdar://problem/50408046> 8 9 Reviewed by Alex Christensen. 10 11 * Shared/cf/ArgumentCodersCF.cpp: 12 (IPC::decode): 13 When decoding the elements inside a CFArrayRef, if decoding was successful but 14 the CFTypeRef element is still null then skip it instead of trying to append it 15 to the array. A CFArray container is not allowed to contain null. 16 Some of our decoders for CFTypeRef types may not initialize the element even if 17 the decode() function returns true. For example, the decoders for CFArrayRef and 18 CFDictionaryRef return true if the encoded container was null but do not create 19 a container. 20 21 * Shared/mac/SecItemResponseData.cpp: 22 (WebKit::SecItemResponseData::SecItemResponseData): 23 nit: The wrong parameter was being moved. This is more efficient. 24 25 (WebKit::SecItemResponseData::encode const): 26 nit: Drop unnecessary .get(). 27 28 * UIProcess/mac/SecItemShimProxy.cpp: 29 (WebKit::SecItemShimProxy::secItemRequest): 30 nit: Use nullptr instead of 0. 31 32 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245911 268f45cc-cd09-0410-ab3c-d52691b4dbfc 33 34 2019-05-30 Chris Dumez <cdumez@apple.com> 35 36 Network process crash when decoding SecItemResponseData 37 https://bugs.webkit.org/show_bug.cgi?id=198388 38 <rdar://problem/50408046> 39 40 Reviewed by Alex Christensen. 41 42 * Shared/cf/ArgumentCodersCF.cpp: 43 (IPC::decode): 44 When decoding the elements inside a CFArrayRef, if decoding was successful but 45 the CFTypeRef element is still null then skip it instead of trying to append it 46 to the array. A CFArray container is not allowed to contain null. 47 Some of our decoders for CFTypeRef types may not initialize the element even if 48 the decode() function returns true. For example, the decoders for CFArrayRef and 49 CFDictionaryRef return true if the encoded container was null but do not create 50 a container. 51 52 * Shared/mac/SecItemResponseData.cpp: 53 (WebKit::SecItemResponseData::SecItemResponseData): 54 nit: The wrong parameter was being moved. This is more efficient. 55 56 (WebKit::SecItemResponseData::encode const): 57 nit: Drop unnecessary .get(). 58 59 * UIProcess/mac/SecItemShimProxy.cpp: 60 (WebKit::SecItemShimProxy::secItemRequest): 61 nit: Use nullptr instead of 0. 62 1 63 2019-06-12 Null <null@apple.com> 2 64 -
branches/safari-607-branch/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp
r244255 r246648 347 347 return false; 348 348 349 RetainPtr<CFMutableArrayRef>array = adoptCF(CFArrayCreateMutable(0, 0, &kCFTypeArrayCallBacks));349 auto array = adoptCF(CFArrayCreateMutable(0, 0, &kCFTypeArrayCallBacks)); 350 350 351 351 for (size_t i = 0; i < size; ++i) { … … 354 354 return false; 355 355 356 if (!element) 357 continue; 358 356 359 CFArrayAppendValue(array.get(), element.get()); 357 360 } -
branches/safari-607-branch/Source/WebKit/Shared/mac/SecItemResponseData.cpp
r204668 r246648 45 45 { 46 46 encoder << static_cast<int64_t>(m_resultCode); 47 encoder << static_cast<bool>(m_resultObject .get());47 encoder << static_cast<bool>(m_resultObject); 48 48 if (m_resultObject) 49 49 IPC::encode(encoder, m_resultObject.get()); -
branches/safari-607-branch/Source/WebKit/UIProcess/mac/SecItemShimProxy.cpp
r232990 r246648 66 66 case SecItemRequestData::Invalid: 67 67 LOG_ERROR("SecItemShimProxy::secItemRequest received an invalid data request. Please file a bug if you know how you caused this."); 68 response = SecItemResponseData (errSecParam, nullptr);68 response = SecItemResponseData { errSecParam, nullptr }; 69 69 break; 70 70 71 71 case SecItemRequestData::CopyMatching: { 72 CFTypeRef resultObject = 0;72 CFTypeRef resultObject = nullptr; 73 73 OSStatus resultCode = SecItemCopyMatching(request.query(), &resultObject); 74 response = SecItemResponseData (resultCode, adoptCF(resultObject).get());74 response = SecItemResponseData { resultCode, adoptCF(resultObject).get() }; 75 75 break; 76 76 } … … 80 80 // serialize SecKeychainItemRef. 81 81 OSStatus resultCode = SecItemAdd(request.query(), nullptr); 82 response = SecItemResponseData (resultCode, nullptr);82 response = SecItemResponseData { resultCode, nullptr }; 83 83 break; 84 84 } … … 86 86 case SecItemRequestData::Update: { 87 87 OSStatus resultCode = SecItemUpdate(request.query(), request.attributesToMatch()); 88 response = SecItemResponseData (resultCode, 0);88 response = SecItemResponseData { resultCode, nullptr }; 89 89 break; 90 90 } … … 92 92 case SecItemRequestData::Delete: { 93 93 OSStatus resultCode = SecItemDelete(request.query()); 94 response = SecItemResponseData (resultCode, 0);94 response = SecItemResponseData { resultCode, nullptr }; 95 95 break; 96 96 }
Note:
See TracChangeset
for help on using the changeset viewer.