Changeset 32531 in webkit
- Timestamp:
- Apr 24, 2008 7:04:15 PM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r32530 r32531 1 2008-04-24 Justin Garcia <justin.garcia@apple.com> 2 3 Reviewed by John Sullivan. 4 5 It is possible, despite our safeguards, for createMarkup to iterate past the end of the Range 6 that is passed to it. Added a null check to prevent crashes in this situation (we won't crash but 7 we will create too much markup), and added an ASSERT to hopefully catch the scenario in a debugger 8 and help us understand what's going on. 9 10 * editing/markup.cpp: 11 (WebCore::createMarkup): 12 1 13 2008-04-24 Mark Rowe <mrowe@apple.com> 2 14 -
trunk/WebCore/editing/markup.cpp
r31932 r32531 710 710 Node* next; 711 711 for (Node* n = startNode; n != pastEnd; n = next) { 712 713 // According to <rdar://problem/5730668>, it is possible for n to blow past pastEnd and become null here. This 714 // shouldn't be possible. This null check will prevent crashes (but create too much markup) and the ASSERT will 715 // hopefully lead us to understanding the problem. 716 ASSERT(n); 717 if (!n) 718 break; 719 712 720 next = n->traverseNextNode(); 713 721 bool skipDescendants = false;
Note: See TracChangeset
for help on using the changeset viewer.