Open Bug 550943 Opened 10 years ago Updated 2 years ago
Entry::Cairo Font Face doesn't handle failure from FT _New _Face
222 FontEntry::CairoFontFace() 227 FT_Face face; 228 FT_New_Face(gfxToolkitPlatform::GetPlatform()->GetFTLibrary(), mFilename.get(), mFTFontIndex, &face); everyone else handles failure from FT_New_Face
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #431163 - Flags: review?(jfkthame)
Comment on attachment 431163 [details] [diff] [review] proposal Hmmm. Well, it's true that we ought to handle failure, but I'm not sure this gains us much, as we pass the return value of FontEntry::CairoFontFace() directly to cairo_scaled_font_create() at http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/src/gfxFT2Fonts.cpp#876, and that API is not documented as safely accepting NULL. So rather than just checking at this callsite, I think we need to track where the resulting NULL goes and ensure that we handle the error safely at the higher levels as well.
Attachment #431163 - Flags: review?(jfkthame) → review-
You need to log in before you can comment on or make changes to this bug.