Changeset 275320 in webkit
- Timestamp:
- Mar 31, 2021, 4:38:30 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/editing/inserting/crash-make-boundary-point-expected.txt (added)
-
LayoutTests/editing/inserting/crash-make-boundary-point.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/Position.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r275315 r275320 1 2021-03-31 Venky Dass <yaranamavenkataramana@apple.com> 2 3 Null pointer access crash in WebCore::makeBoundaryPoint(..) 4 https://bugs.webkit.org/show_bug.cgi?id=223977 5 6 Reviewed by Darin Adler. 7 8 Adding a refression test case. 9 10 * editing/inserting/crash-make-boundary-point-expected.txt: Added. 11 * editing/inserting/crash-make-boundary-point.html: Added. 12 1 13 2021-03-31 Chris Gambrell <cgambrell@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r275314 r275320 1 2021-03-31 Venky Dass <yaranamavenkataramana@apple.com> 2 3 Null pointer access crash in WebCore::makeBoundaryPoint(..) 4 https://bugs.webkit.org/show_bug.cgi?id=223977 5 6 Reviewed by Darin Adler. 7 8 In makeBoundaryPoint, position.containerNode() can be nullptr even if position.isNull() was false 9 10 Test: LayoutTests/editing/inserting/crash-make-boundary-point.html 11 12 * dom/Position.cpp: 13 (WebCore::makeBoundaryPoint): 14 1 15 2021-03-31 Eric Carlson <eric.carlson@apple.com> 2 16 -
trunk/Source/WebCore/dom/Position.cpp
r271705 r275320 1595 1595 Optional<BoundaryPoint> makeBoundaryPoint(const Position& position) 1596 1596 { 1597 if (position.isNull()) 1597 auto container = makeRefPtr(position.containerNode()); 1598 if (!container) 1598 1599 return WTF::nullopt; 1599 return BoundaryPoint { *position.containerNode(), static_cast<unsigned>(position.computeOffsetInContainerNode()) };1600 return BoundaryPoint { container.releaseNonNull(), static_cast<unsigned>(position.computeOffsetInContainerNode()) }; 1600 1601 } 1601 1602
Note:
See TracChangeset
for help on using the changeset viewer.