Changeset 259661 in webkit
- Timestamp:
- Apr 7, 2020, 1:03:10 PM (6 years ago)
- Location:
- branches/safari-609.2.1.2-branch/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/ios/WebPageProxyIOS.mm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-609.2.1.2-branch/Source/WebKit/ChangeLog
r259499 r259661 1 2020-04-07 Alan Coon <alancoon@apple.com> 2 3 Apply patch. rdar://problem/61404555 4 5 2020-04-07 David Kilzer <ddkilzer@apple.com> 6 7 Cherry-pick r258053. rdar://problem/60430195 8 9 2020-03-06 David Kilzer <ddkilzer@apple.com> 10 11 IPC hardening for WebPageProxy::SaveImageToLibrary message 12 <https://webkit.org/b/208730> 13 <rdar://problem/58700693> 14 15 Reviewed by Chris Dumez. 16 17 * UIProcess/ios/WebPageProxyIOS.mm: 18 (MESSAGE_CHECK): Define macro only for methods in this source file. 19 (WebKit::WebPageProxy::saveImageToLibrary): 20 - Make sure the shared memory handle sent over IPC is not null. 21 - Make sure the image size sent over IPC is not zero. 22 - Null check the SharedMemory object after calling 23 SharedMemory::map(). 24 1 25 2020-04-03 Alan Coon <alancoon@apple.com> 2 26 -
branches/safari-609.2.1.2-branch/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
r256559 r259661 77 77 #endif 78 78 79 #define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, process().connection()) 80 79 81 #define RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), channel, "%p - [pageProxyID=%llu, webPageID=%llu, PID=%i] WebPageProxy::" fmt, this, m_identifier.toUInt64(), m_webPageID.toUInt64(), m_process->processIdentifier(), ##__VA_ARGS__) 80 82 … … 645 647 void WebPageProxy::saveImageToLibrary(const SharedMemory::Handle& imageHandle, uint64_t imageSize) 646 648 { 649 MESSAGE_CHECK(!imageHandle.isNull()); 650 MESSAGE_CHECK(imageSize); 651 647 652 auto sharedMemoryBuffer = SharedMemory::map(imageHandle, SharedMemory::Protection::ReadOnly); 653 if (!sharedMemoryBuffer) 654 return; 655 648 656 auto buffer = SharedBuffer::create(static_cast<unsigned char*>(sharedMemoryBuffer->data()), imageSize); 649 657 pageClient().saveImageToLibrary(WTFMove(buffer)); … … 1500 1508 1501 1509 #undef RELEASE_LOG_IF_ALLOWED 1510 #undef MESSAGE_CHECK 1502 1511 1503 1512 #endif // PLATFORM(IOS_FAMILY)
Note:
See TracChangeset
for help on using the changeset viewer.