Changeset 264018 in webkit
- Timestamp:
- Jul 7, 2020, 8:20:09 AM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
WebProcess/Plugins/PDF/PDFPlugin.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r264016 r264018 1 2020-07-07 Brady Eidson <beidson@apple.com> 2 3 Fix CrashTracer reported in PDFPlugin::ByteRangeRequest::maybeComplete. 4 <rdar://problem/64884982> and https://bugs.webkit.org/show_bug.cgi?id=214026 5 6 Reviewed by Tim Horton. 7 8 No new tests (CrashTracer with no reproduction) 9 10 Due to the racy-ness of how PDFKit calls us on the background thread vs. what might be 11 happening with the main thread, sometimes the main thread is asked to handle a data 12 request either: 13 - Before m_data is allocated 14 or 15 - After it is deallocated 16 17 In either case it's okay to just not handle it. 18 19 Despite understanding how to reproduce in theory, writing a test case has been elusive. 20 21 * WebProcess/Plugins/PDF/PDFPlugin.mm: 22 (WebKit::PDFPlugin::ByteRangeRequest::maybeComplete): Null check m_data before doing anything with it. 23 1 24 2020-07-07 Carlos Garcia Campos <cgarcia@igalia.com> 2 25 -
trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm
r263169 r264018 1044 1044 bool PDFPlugin::ByteRangeRequest::maybeComplete(PDFPlugin& plugin) 1045 1045 { 1046 if (!plugin.m_data) 1047 return false; 1048 1046 1049 if (plugin.m_streamedBytes >= m_position + m_count) { 1047 1050 completeWithBytes(CFDataGetBytePtr(plugin.m_data.get()) + m_position, m_count, plugin); … … 1056 1059 return true; 1057 1060 } 1061 1058 1062 return false; 1059 1063 }
Note:
See TracChangeset
for help on using the changeset viewer.