Changeset 266416 in webkit
- Timestamp:
- Sep 1, 2020 3:56:19 PM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r266412 r266416 1 2020-09-01 Kate Cheney <katherine_cheney@apple.com> 2 3 WebPasteboardProxy::getPasteboardStringsForType() and WebPasteboardProxy::readURLFromPasteboard() should check return value of SharedMemory::createHandle() 4 https://bugs.webkit.org/show_bug.cgi?id=211002 5 <rdar://problem/60103950> 6 7 Reviewed by Wenson Hsieh. 8 9 * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: 10 (WebKit::WebPasteboardProxy::getPasteboardBufferForType): 11 (WebKit::WebPasteboardProxy::readBufferFromPasteboard): 12 Check result of SharedMemory::createHandle() and return early 13 on failure. 14 1 15 2020-09-01 Hector Lopez <hector_i_lopez@apple.com> 2 16 -
trunk/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm
r265702 r266416 214 214 memcpy(sharedMemoryBuffer->data(), buffer->data(), size); 215 215 SharedMemory::Handle handle; 216 sharedMemoryBuffer->createHandle(handle, SharedMemory::Protection::ReadOnly); 216 if (!sharedMemoryBuffer->createHandle(handle, SharedMemory::Protection::ReadOnly)) 217 return completionHandler({ }); 217 218 completionHandler(SharedMemory::IPCHandle { WTFMove(handle), size }); 218 219 } … … 431 432 memcpy(sharedMemoryBuffer->data(), buffer->data(), size); 432 433 SharedMemory::Handle handle; 433 sharedMemoryBuffer->createHandle(handle, SharedMemory::Protection::ReadOnly); 434 if (!sharedMemoryBuffer->createHandle(handle, SharedMemory::Protection::ReadOnly)) 435 return completionHandler({ }); 434 436 completionHandler(SharedMemory::IPCHandle { WTFMove(handle), size }); 435 437 }
Note: See TracChangeset
for help on using the changeset viewer.