mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 703100 followup - fix potential crash due to string not being null-terminated.
This commit is contained in:
parent
248500c61c
commit
ef5972b56b
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user