Changeset 288308 in webkit
- Timestamp:
- Jan 20, 2022 11:08:25 AM (2 years ago)
- Location:
- releases/WebKitGTK/webkit-2.34
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.34/LayoutTests/ChangeLog
r288292 r288308 1 2022-01-14 Frederic Wang <fwang@igalia.com> 2 3 null ptr deref in WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor() 4 https://bugs.webkit.org/show_bug.cgi?id=233463 5 6 Reviewed by Wenson Hsieh. 7 8 Add non-regression test. 9 10 * editing/execCommand/paste-as-quotation-disconnected-paragraph-ancestor-crash-expected.txt: Added. 11 * editing/execCommand/paste-as-quotation-disconnected-paragraph-ancestor-crash.html: Added. 12 * editing/execCommand/resources/paste-as-quotation-disconnected-paragraph-ancestor-crash-iframe.html: Added. 13 * platform/win/TestExpectations: Skip test on windows, as the test seems to shift expectations with text output 14 of other execCommand tests. 15 1 16 2022-01-10 Alan Bujtas <zalan@apple.com> 2 17 -
releases/WebKitGTK/webkit-2.34/LayoutTests/platform/win/TestExpectations
r281762 r288308 316 316 fast/overflow/scrollbar-restored-and-then-locked.html [ Skip ] 317 317 318 editing/execCommand/paste-as-quotation-disconnected-paragraph-ancestor-crash.html [ Skip ] 318 319 storage/indexeddb/clone-exception.html [ Timeout ] 319 320 storage/indexeddb/database-odd-names.html [ Timeout Failure ] -
releases/WebKitGTK/webkit-2.34/Source/WebCore/ChangeLog
r288292 r288308 1 2022-01-14 Frederic Wang <fwang@igalia.com> 2 3 null ptr deref in WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor() 4 https://bugs.webkit.org/show_bug.cgi?id=233463 5 6 Reviewed by Wenson Hsieh. 7 8 One line of ReplaceSelectionCommand::moveNodeOutOfAncestor() assumes that the pointer 9 ancestor.parentNode() is non-null. However, the call to removeNode(node) just before can 10 lead to arbitrary tree mutations that leaves the ancestor orphan, causing a nullptr deref. 11 This patch mitigates that issue by exiting early if that situation happens. 12 13 * editing/ReplaceSelectionCommand.cpp: 14 (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor): Exit early if the ancestor 15 is no longer connected. 16 1 17 2022-01-10 Alan Bujtas <zalan@apple.com> 2 18 -
releases/WebKitGTK/webkit-2.34/Source/WebCore/editing/ReplaceSelectionCommand.cpp
r281745 r288308 831 831 if (positionAtEndOfNode == lastPositionInParagraph) { 832 832 removeNode(node); 833 if (!ancestor.isConnected()) 834 return; 833 835 if (ancestor.nextSibling()) 834 836 insertNodeBefore(WTFMove(protectedNode), *ancestor.nextSibling());
Note: See TracChangeset
for help on using the changeset viewer.