Commit f4b89b20 authored by jyasskin@chromium.org's avatar jyasskin@chromium.org

Make sure getFallbackFamily() always sets *scriptChecked.

This avoids an uninitialized read in
FontCache::fallbackFontForCharacter(), which assumes the script is set.
Found by DrMemory in
http://build.chromium.org/p/chromium.memory.fyi/builders/Windows%20Content%20Browser%20%28DrMemory%20full%29%20%284%29/builds/5885/steps/memory%20test%3A%20content_browsertests/logs/stdio.

Review URL: https://codereview.chromium.org/1327143002

git-svn-id: svn://svn.chromium.org/blink/trunk@202009 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent b579566e
...@@ -404,8 +404,11 @@ const UChar* getFallbackFamily(UChar32 character, ...@@ -404,8 +404,11 @@ const UChar* getFallbackFamily(UChar32 character,
ASSERT(character); ASSERT(character);
ASSERT(fontManager); ASSERT(fontManager);
const UChar* family = getFontBasedOnUnicodeBlock(character, fontManager); const UChar* family = getFontBasedOnUnicodeBlock(character, fontManager);
if (family) if (family) {
if (scriptChecked)
*scriptChecked = USCRIPT_INVALID_CODE;
return family; return family;
}
UScriptCode script = getScript(character); UScriptCode script = getScript(character);
......
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