splash/SplashFTFont.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit 6e2de368f620d2e459a4cfe6533a8c29fae6d8c9 Author: Albert Astals Cid <aa...@kde.org> Date: Wed May 23 19:21:30 2018 +0200 SplashFTFont::SplashFTFont: Early return if textScale is 0 fixes oss-fuzz/8482 diff --git a/splash/SplashFTFont.cc b/splash/SplashFTFont.cc index de7a494a..61339ef3 100644 --- a/splash/SplashFTFont.cc +++ b/splash/SplashFTFont.cc @@ -11,7 +11,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2005, 2007-2011, 2014 Albert Astals Cid <aa...@kde.org> +// Copyright (C) 2005, 2007-2011, 2014, 2018 Albert Astals Cid <aa...@kde.org> // Copyright (C) 2006 Kristian Høgsberg <k...@bitplanet.net> // Copyright (C) 2009 Petr Gajdos <pgaj...@novell.com> // Copyright (C) 2010 Suzuki Toshiya <mpsuz...@hiroshima-u.ac.jp> @@ -42,6 +42,8 @@ #include "SplashFTFontFile.h" #include "SplashFTFont.h" +#include "goo/GooLikely.h" + //------------------------------------------------------------------------ static int glyphPathMoveTo(const FT_Vector *pt, void *path); @@ -84,6 +86,10 @@ 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)) { + return; + } + div = face->bbox.xMax > 20000 ? 65536 : 1; #ifdef USE_FIXEDPOINT _______________________________________________ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler