Commit 6fbd8db2 authored by dglazkov@chromium.org's avatar dglazkov@chromium.org

2009-06-16 Tony Chang <tony@chromium.org>

        Reviewed by Darin Fisher.

        Fix a UMR in WebCore::BitStack by initializing new memory to 0.
        https://bugs.webkit.org/show_bug.cgi?id=26449
        No new tests, covered by purify.

        * editing/TextIterator.cpp:
        (WebCore::BitStack::push):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 365f91eb
2009-06-16 Tony Chang <tony@chromium.org>
Reviewed by Darin Fisher.
Fix a UMR in WebCore::BitStack by initializing new memory to 0.
https://bugs.webkit.org/show_bug.cgi?id=26449
No new tests, covered by purify.
* editing/TextIterator.cpp:
(WebCore::BitStack::push):
2009-06-16 Brent Fulgham <bfulgham@webkit.org>
Reviewed by Xan Lopez.
......
......@@ -109,8 +109,10 @@ void BitStack::push(bool bit)
{
unsigned index = m_size / bitsInWord;
unsigned shift = m_size & bitInWordMask;
if (!shift && index == m_words.size())
if (!shift && index == m_words.size()) {
m_words.grow(index + 1);
m_words[index] = 0;
}
unsigned& word = m_words[index];
unsigned mask = 1U << shift;
if (bit)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment