зеркало из https://github.com/mozilla/pjs.git
Bug 372639. Don't die if the font selection code gives us more glyphs than we're supposed to have (just assert). r=pavlov
This commit is contained in:
Родитель
e2710aeb0b
Коммит
764396d085
|
@ -931,6 +931,10 @@ gfxPangoFontGroup::SetGlyphs(gfxTextRun* aTextRun,
|
|||
nsAutoTArray<gfxTextRun::DetailedGlyph,1> detailedGlyphs;
|
||||
|
||||
while (index < aUTF8Length) {
|
||||
if (utf16Offset >= textRunLength) {
|
||||
NS_ERROR("Someone has added too many glyphs!");
|
||||
break;
|
||||
}
|
||||
if (aUTF8[index] == 0) {
|
||||
// treat this null byte as a missing glyph
|
||||
aTextRun->SetCharacterGlyph(utf16Offset, g.SetMissing());
|
||||
|
|
Загрузка…
Ссылка в новой задаче