зеркало из https://github.com/mozilla/gecko-dev.git
bug 703100 followup - fix potential crash due to string not being null-terminated.
This commit is contained in:
Родитель
c9b5aa3a72
Коммит
cb01e05f33
|
@ -1849,7 +1849,8 @@ gfxFont::GetShapedWord(gfxContext *aContext,
|
|||
ok = ShapeWord(aContext, sw, (const PRUnichar*)aText);
|
||||
} else {
|
||||
nsAutoString utf16;
|
||||
AppendASCIItoUTF16((const char*)aText, utf16);
|
||||
AppendASCIItoUTF16(nsDependentCSubstring((const char*)aText, aLength),
|
||||
utf16);
|
||||
ok = ShapeWord(aContext, sw, utf16.BeginReading());
|
||||
}
|
||||
NS_WARN_IF_FALSE(ok, "failed to shape word - expect garbled text");
|
||||
|
|
Загрузка…
Ссылка в новой задаче