From bae7aeaa877799dc8cffdf66aba2ef118b19a186 Mon Sep 17 00:00:00 2001 From: John Reck Date: Fri, 31 Aug 2012 11:43:52 -0700 Subject: Fix initialization Bug: 7074134 There are early returns in the TextIterator ctor that would result in m_needsAnotherNewline being left unitialized. This results in the first call to advance() crashing due to m_needsAnotherNewline taking an earlier path that doesn't have all the same initialized checks Change-Id: I1d89912532275323f71de8055c33257619b93cbb --- Source/WebCore/editing/TextIterator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/WebCore/editing/TextIterator.cpp b/Source/WebCore/editing/TextIterator.cpp index 3aa68af..871d1f9 100644 --- a/Source/WebCore/editing/TextIterator.cpp +++ b/Source/WebCore/editing/TextIterator.cpp @@ -298,6 +298,7 @@ TextIterator::TextIterator(const Range* r, TextIteratorBehavior behavior) #if OS(ANDROID) , m_stopsOnFormControls(behavior & TextIteratorStopsOnFormControls) , m_shouldStop(false) + , m_needsAnotherNewline(false) #endif { if (!r) -- cgit v1.1