summaryrefslogtreecommitdiff
path: root/poppler/PSOutputDev.cc
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2009-04-11 00:23:04 +0200
committerAlbert Astals Cid <aacid@kde.org>2009-04-11 00:23:04 +0200
commit7b2d314a61fd0e12f47c62996cb49ec0d1ba747a (patch)
tree064d114c633e1d698211a85026580aacdc12309a /poppler/PSOutputDev.cc
parent0131f0a01cba8691d10a18de1137a4744988b346 (diff)
Be paranoid, use gmallocn or gmallocn3 in all gmalloc with *
Diffstat (limited to 'poppler/PSOutputDev.cc')
-rw-r--r--poppler/PSOutputDev.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 9477762e..f02bd98a 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -15,7 +15,7 @@
//
// Copyright (C) 2005 Martin Kretzschmar <martink@gnome.org>
// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
-// Copyright (C) 2006-2008 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006-2009 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2006 Jeff Muizelaar <jeff@infidigm.net>
// Copyright (C) 2007, 2008 Brad Hards <bradh@kde.org>
// Copyright (C) 2008 Koji Otani <sho@bbr.jp>
@@ -2324,7 +2324,7 @@ GooString *PSOutputDev::setupExternalCIDTrueTypeFont(GfxFont *font, GooString *f
if ((ffTT = FoFiTrueType::load(fileName->getCString(), faceIndex))) {
int n = ((GfxCIDFont *)font)->getCIDToGIDLen();
if (n) {
- codeToGID = (Gushort *)gmalloc(n * sizeof(Gushort));
+ codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort));
memcpy(codeToGID, ((GfxCIDFont *)font)->getCIDToGID(), n * sizeof(Gushort));
} else {
codeToGID = ((GfxCIDFont *)font)->getCodeToGIDMap(ffTT, &n);
@@ -4503,7 +4503,7 @@ void PSOutputDev::doImageL1Sep(GfxImageColorMap *colorMap,
width, -height, height);
// allocate a line buffer
- lineBuf = (Guchar *)gmalloc(4 * width);
+ lineBuf = (Guchar *)gmallocn(width, 4);
// set up to process the data stream
imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(),