[webkit-changes] [WebKit/WebKit] 90db59: [iOS] Reading the UIImage type from the system pas...
Aditya Keerthi
noreply at github.com
Wed Feb 22 10:24:48 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 90db59bf540852d8234db7a7241ead6e1a2051d1
https://github.com/WebKit/WebKit/commit/90db59bf540852d8234db7a7241ead6e1a2051d1
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/WebCore/platform/Pasteboard.h
M Source/WebCore/platform/ios/PasteboardIOS.mm
M Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
Log Message:
-----------
[iOS] Reading the UIImage type from the system pasteboard can return invalid data
https://bugs.webkit.org/show_bug.cgi?id=252697
rdar://105749644
Reviewed by Wenson Hsieh.
Disallow reading the UIImage type from the system pasteboard to avoid returning
invalid data.
* Source/WebCore/platform/Pasteboard.h:
* Source/WebCore/platform/ios/PasteboardIOS.mm:
* Source/WebCore/platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::bufferForType const):
`-[UIPasteboard dataForPasteboardType:]` is equivalent to
`-[UIPasteboard dataForPasteboardType:inItemSet:]` with
`[NSIndexSet indexSetWithIndex:0]`.
Funnel into `PlatformPasteboard::readBuffer` to avoid checking the disallowed
list in two places.
(WebCore::isDisallowedTypeForReadBuffer):
(WebCore::PlatformPasteboard::readBuffer const):
Canonical link: https://commits.webkit.org/260681@main
More information about the webkit-changes
mailing list