diff options
author | Albert Astals Cid <aacid@kde.org> | 2010-02-17 21:54:31 +0000 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2010-02-17 21:55:32 +0000 |
commit | dfc43459df669a757faca07b2b44bde59766468e (patch) | |
tree | c82d4153deb52fd5b10d005068a3ba726c95f3ee | |
parent | ef7339eb26d76714250ed25bd826d737283cc1a4 (diff) |
if malloc failed return false
-rw-r--r-- | splash/SplashFTFont.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/splash/SplashFTFont.cc b/splash/SplashFTFont.cc index d4675f75..9dd0c9cc 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@kde.org> +// Copyright (C) 2005, 2007-2010 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2006 Kristian Høgsberg <krh@bitplanet.net> // Copyright (C) 2009 Petr Gajdos <pgajdos@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; |