[Chromium] Uninitialized access in SimpleFontDataSkia::platformInit
authorbashi@chromium.org <bashi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Mar 2012 02:42:05 +0000 (02:42 +0000)
committerbashi@chromium.org <bashi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Mar 2012 02:42:05 +0000 (02:42 +0000)
commitb24163666d46999db6191b96c9add9d192075e36
treeebb7b8c2e4e5463c69474f55aab8391f80723ba5
parentbbb3ef09eddafed5d82f0bf8b986915471d20a64
[Chromium] Uninitialized access in SimpleFontDataSkia::platformInit
https://bugs.webkit.org/show_bug.cgi?id=82411

Reviewed by Kent Tamura.

SimpleFontDataSkia::platformInit() could call widthForGlyph(), which
accesses m_zeroWidthSpaceGlyph. This causes a valgrind memcheck error
because m_zeroWidthSpaceGlyph isn't initialized at this point.
Initialize m_zeroWidthSpaceGlyph with zero so that widthForGlyph() can
return appropriate value(The value zero here means "unknown glyph").

No new tests. I manually confirmed this change fixes the valgrind
memcheck error.

* platform/graphics/skia/SimpleFontDataSkia.cpp:
(WebCore::SimpleFontData::platformInit):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/skia/SimpleFontDataSkia.cpp