[poppler] Branch 'poppler-0.12' - splash/SplashFTFont.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Feb 17 13:55:47 PST 2010


 splash/SplashFTFont.cc |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit dfc43459df669a757faca07b2b44bde59766468e
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Feb 17 21:54:31 2010 +0000

    if malloc failed return false

diff --git a/splash/SplashFTFont.cc b/splash/SplashFTFont.cc
index d4675f7..9dd0c9c 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-2009 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2005, 2007-2010 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2006 Kristian Høgsberg <krh at bitplanet.net>
 // Copyright (C) 2009 Petr Gajdos <pgajdos at novell.com>
 //
@@ -240,6 +240,9 @@ GBool SplashFTFont::makeGlyph(int c, int xFrac, int yFrac,
     rowSize = (bitmap->w + 7) >> 3;
   }
   bitmap->data = (Guchar *)gmallocn_checkoverflow(rowSize, bitmap->h);
+  if (!bitmap->data) {
+    return gFalse;
+  }
   bitmap->freeData = gTrue;
   for (i = 0, p = bitmap->data, q = slot->bitmap.buffer;
        i < bitmap->h;


More information about the poppler mailing list