diff options
Diffstat (limited to 'skia/ext/SkFontHost_fontconfig_direct.cpp')
-rw-r--r-- | skia/ext/SkFontHost_fontconfig_direct.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/skia/ext/SkFontHost_fontconfig_direct.cpp b/skia/ext/SkFontHost_fontconfig_direct.cpp index 3f19fc7..9434f51 100644 --- a/skia/ext/SkFontHost_fontconfig_direct.cpp +++ b/skia/ext/SkFontHost_fontconfig_direct.cpp @@ -46,6 +46,9 @@ bool FontConfigDirect::Match(std::string* result_family, bool fileid_valid, unsigned fileid, const std::string& family, bool* is_bold, bool* is_italic) { + if (family.length() > kMaxFontFamilyLength) + return false; + SkAutoMutexAcquire ac(mutex_); FcPattern* pattern = FcPatternCreate(); |