Changeset 247734 in webkit
- Timestamp:
- Jul 23, 2019, 12:50:17 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r247730 r247734 229 229 230 230 * Scripts/SettingsTemplates/Settings.cpp.erb: 231 232 2019-07-22 Simon Fraser <simon.fraser@apple.com> 233 234 Fix crashes in ScrollingStateNode::insertChild() 235 https://bugs.webkit.org/show_bug.cgi?id=200023 236 rdar://problem/53265378 237 238 Reviewed by Darin Adler. 239 240 Crash data suggest that ScrollingStateNode::insertChild() can be passed an index that 241 is larger than the size of the vector, causing crashes. 242 243 Fix defensively by falling back to append() if the passed index is equal to or larger 244 than the size of the children vector. 245 246 * page/scrolling/ScrollingStateNode.cpp: 247 (WebCore::ScrollingStateNode::insertChild): 231 248 232 249 2019-07-22 Simon Fraser <simon.fraser@apple.com> -
trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp
r246913 r247734 117 117 } 118 118 119 m_children->insert(index, WTFMove(childNode)); 119 if (index > m_children->size()) { 120 ASSERT_NOT_REACHED(); // Crash data suggest we can get here. 121 m_children->append(WTFMove(childNode)); 122 } else 123 m_children->insert(index, WTFMove(childNode)); 124 120 125 setPropertyChanged(ChildNodes); 121 126 }
Note:
See TracChangeset
for help on using the changeset viewer.