diff options
author | Matt Brubeck <mbrubeck@limpet.net> | 2015-08-28 14:31:07 -0700 |
---|---|---|
committer | Matt Brubeck <mbrubeck@limpet.net> | 2015-09-03 13:35:44 -0700 |
commit | afafb0b71cc9f8721ea31b027570254aa7f6b012 (patch) | |
tree | 1bdb942d6176f40cb6b3fb199f2f905ae15f2b72 /components/gfx/platform/macos | |
parent | 3f9b6f8586b60929ccbfe1cf51b84887ef711b77 (diff) | |
download | servo-afafb0b71cc9f8721ea31b027570254aa7f6b012.tar.gz servo-afafb0b71cc9f8721ea31b027570254aa7f6b012.zip |
Implement get_table_for_tag on FreeType
Also fixes use-after-free of FontTable buffers.
Diffstat (limited to 'components/gfx/platform/macos')
-rw-r--r-- | components/gfx/platform/macos/font.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/gfx/platform/macos/font.rs b/components/gfx/platform/macos/font.rs index eb33e326230..b332d680c36 100644 --- a/components/gfx/platform/macos/font.rs +++ b/components/gfx/platform/macos/font.rs @@ -192,10 +192,10 @@ impl FontHandleMethods for FontHandle { return metrics; } - fn get_table_for_tag(&self, tag: FontTableTag) -> Option<FontTable> { + fn get_table_for_tag(&self, tag: FontTableTag) -> Option<Box<FontTable>> { let result: Option<CFData> = self.ctfont.get_font_table(tag); result.and_then(|data| { - Some(FontTable::wrap(data)) + Some(box FontTable::wrap(data)) }) } } |