summaryrefslogtreecommitdiff
path: root/poppler
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2006-02-05 15:46:10 +0000
committerAlbert Astals Cid <aacid@kde.org>2006-02-05 15:46:10 +0000
commit33e98f81cdfda0935ac7ea79a691976465ec790b (patch)
tree34ac5196d4bf7f40c5d464adcda36957107921f9 /poppler
parent6d9e6489d24b3105204ff4233f6493136e9b5715 (diff)
Some small fixes from kpdf
Diffstat (limited to 'poppler')
-rw-r--r--poppler/Gfx.cc1
-rw-r--r--poppler/GfxFont.cc1
-rw-r--r--poppler/JBIG2Stream.cc2
-rw-r--r--poppler/SplashOutputDev.cc1
4 files changed, 3 insertions, 2 deletions
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index feda2e46..8041004c 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -3526,6 +3526,7 @@ Stream *Gfx::buildImageStream() {
break;
}
dict.dictAdd(key, &obj);
+ gfree(key);
}
parser->getObj(&obj);
}
diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc
index 962c140b..0b16bc56 100644
--- a/poppler/GfxFont.cc
+++ b/poppler/GfxFont.cc
@@ -1534,6 +1534,7 @@ Gushort *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
int cidlen;
*mapsizep = 0;
+ if (!ctu) return NULL;
/* we use only unicode cmap */
cmap = -1;
diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index 337f5ccc..3ce53e99 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -2325,7 +2325,7 @@ void JBIG2Stream::readHalftoneRegionSeg(Guint segNum, GBool imm,
error(getPos(), "Bad size in JBIG2 halftone segment");
return;
}
- if (w == 0 || h >= INT_MAX / w) {
+ if (h < 0 || w == 0 || h >= INT_MAX / w) {
error(getPos(), "Bad size in JBIG2 bitmap segment");
return;
}
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 2675c81a..5cd69a10 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -948,7 +948,6 @@ void SplashOutputDev::updateFont(GfxState *state) {
GooString *fileName, *substName;
char *tmpBuf;
int tmpBufLen;
- FILE *tmpFile;
Gushort *codeToGID;
DisplayFontParam *dfp;
CharCodeToUnicode *ctu;