diff options
author | Albert Astals Cid <aacid@kde.org> | 2018-05-29 20:32:23 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2018-05-29 20:32:23 +0200 |
commit | fb4629eb4b1787332b88b330da16353e5ade7b4d (patch) | |
tree | cde18ab4f5764b0bc50beca648225dac5a515b80 /splash/SplashFTFont.cc | |
parent | 943a465d7b76b26de83d2038226c72bcf619c29f (diff) |
SplashFTFont: Early return if face->units_per_EM is 0
fixes oss-fuzz/8617
Diffstat (limited to 'splash/SplashFTFont.cc')
-rw-r--r-- | splash/SplashFTFont.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/splash/SplashFTFont.cc b/splash/SplashFTFont.cc index 79b7fdd4..301be9a7 100644 --- a/splash/SplashFTFont.cc +++ b/splash/SplashFTFont.cc @@ -87,7 +87,7 @@ SplashFTFont::SplashFTFont(SplashFTFontFile *fontFileA, SplashCoord *matA, // arithmetic doesn't work so well textScale = splashDist(0, 0, textMat[2], textMat[3]) / size; - if (unlikely(textScale == 0)) { + if (unlikely(textScale == 0 || face->units_per_EM == 0)) { return; } |