summaryrefslogtreecommitdiff
path: root/poppler
diff options
context:
space:
mode:
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;