[poppler] Getting a raster image like pdf2ppm

Angus March angus at uducat.com
Fri May 15 06:51:00 PDT 2009


I tried using Poppler to get a Cairo surface and then saving the surface
to a PNG. Unfortunately, the resulting image was of disastrously low
quality. The executable pdftoppm, on the other hand, yields perfect
results. I've tried to hack through its code, though, and it seems that
the "Splash" interface is the one I'm looking for. Unfortunately, it's
not documented, and the interface has changed over the years. Not only
that, but I get a fair number of seg faults using it. Can someone give
me some help in using it?

    Here are some valgrind reports that might be part of the seg faults.
Notice how there are messages like "Address 0x10 is not stack'd,
malloc'd or (recently) free'd". 0x10 doesn't sound like an address. It
looks like an integer that is being used as an address.

==26948== Invalid read of size 1
==26948==    at 0x4C26300: memcpy (in
/usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
==26948==    by 0x8DE23E6: (within /usr/lib64/libfreetype.so.6.3.18)
==26948==    by 0x8DE1954: (within /usr/lib64/libfreetype.so.6.3.18)
==26948==    by 0x8DE380B: (within /usr/lib64/libfreetype.so.6.3.18)
==26948==    by 0x8DE3EAB: (within /usr/lib64/libfreetype.so.6.3.18)
==26948==    by 0x8DCA48F: (within /usr/lib64/libfreetype.so.6.3.18)
==26948==    by 0x8DCC8DD: FT_Open_Face (in
/usr/lib64/libfreetype.so.6.3.18)
==26948==    by 0x8DCD6FF: FT_New_Memory_Face (in
/usr/lib64/libfreetype.so.6.3.18)
==26948==    by 0x5A7B7AA:
SplashFTFontFile::loadType1Font(SplashFTFontEngine*, SplashFontFileID*,
SplashFontSrc*, char**) (in /usr/lib64/libpoppler.so.4.0.0)
==26948==    by 0x5A7C5B3:
SplashFontEngine::loadType1Font(SplashFontFileID*, SplashFontSrc*,
char**) (in /usr/lib64/libpoppler.so.4.0.0)
==26948==    by 0x59A7F16: SplashOutputDev::doUpdateFont(GfxState*) (in
/usr/lib64/libpoppler.so.4.0.0)
==26948==    by 0x59A81CB: SplashOutputDev::drawChar(GfxState*, double,
double, double, double, double, double, unsigned, int, unsigned*, int)
(in /usr/lib64/libpoppler.so.4.0.0)
==26948==  Address 0x9ad87a3 is 2 bytes after a block of size 17 alloc'd
==26948==    at 0x4C256AE: malloc (in
/usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
==26948==    by 0x9057B50: (within /usr/lib64/libfontconfig.so.1.3.0)
==26948==    by 0x9057DE5: (within /usr/lib64/libfontconfig.so.1.3.0)
==26948==    by 0x9057F58: FcStrSetAddFilename (in
/usr/lib64/libfontconfig.so.1.3.0)
==26948==    by 0x904561B: (within /usr/lib64/libfontconfig.so.1.3.0)
==26948==    by 0x905B031: (within /usr/lib64/libfontconfig.so.1.3.0)
==26948==    by 0x532C9EC: doContent (in
/usr/local/lib/libPdfOptimizeAPI.so)
==26948==    by 0x532BF85: contentProcessor (in
/usr/local/lib/libPdfOptimizeAPI.so)
==26948==    by 0x532E58F: doProlog (in /usr/local/lib/libPdfOptimizeAPI.so)
==26948==    by 0x532E3D6: prologProcessor (in
/usr/local/lib/libPdfOptimizeAPI.so)
==26948==    by 0x532B8A2: XML_ParseBuffer (in
/usr/local/lib/libPdfOptimizeAPI.so)
==26948==    by 0x9059508: FcConfigParseAndLoad (in
/usr/lib64/libfontconfig.so.1.3.0)

==27443== Invalid read of size 8
==27443==    at 0x59ADF02: JPXStream::readTilePartData(unsigned,
unsigned, int) (in /usr/lib64/libpoppler.so.4.0.0)
==27443==    by 0x59AF00E: JPXStream::readTilePart() (in
/usr/lib64/libpoppler.so.4.0.0)
==27443==    by 0x59B09A4: JPXStream::readCodestream(unsigned) (in
/usr/lib64/libpoppler.so.4.0.0)
==27443==    by 0x59B2E1D: JPXStream::readBoxes() (in
/usr/lib64/libpoppler.so.4.0.0)
==27443==    by 0x59B2FA5: JPXStream::reset() (in
/usr/lib64/libpoppler.so.4.0.0)
==27443==    by 0x59A618F: SplashOutputDev::drawImage(GfxState*,
Object*, Stream*, int, int, GfxImageColorMap*, int*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==27443==    by 0x59E9119: Gfx::doImage(Object*, Stream*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==27443==    by 0x59ED8E6: Gfx::opXObject(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==27443==    by 0x59DEA5C: Gfx::go(int) (in /usr/lib64/libpoppler.so.4.0.0)
==27443==    by 0x59E3015: Gfx::display(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==27443==    by 0x59E5613: Gfx::doForm1(Object*, Dict*, double*,
double*, int, int, GfxColorSpace*, int, int, int, Function*, GfxColor*)
(in /usr/lib64/libpoppler.so.4.0.0)
==27443==    by 0x59ED4AB: Gfx::doForm(Object*) (in
/usr/lib64/libpoppler.so.4.0.0)
==27443==  Address 0x3797009a40 is not stack'd, malloc'd or (recently)
free'd

==13326== Invalid read of size 8
==13326==    at 0x59ADF97: JPXStream::readTilePartData(unsigned,
unsigned, int) (in /usr/lib64/libpoppler.so.4.0.0)
==13326==    by 0x59AF00E: JPXStream::readTilePart() (in
/usr/lib64/libpoppler.so.4.0.0)
==13326==    by 0x59B09A4: JPXStream::readCodestream(unsigned) (in
/usr/lib64/libpoppler.so.4.0.0)
==13326==    by 0x59B2E1D: JPXStream::readBoxes() (in
/usr/lib64/libpoppler.so.4.0.0)
==13326==    by 0x59B2FA5: JPXStream::reset() (in
/usr/lib64/libpoppler.so.4.0.0)
==13326==    by 0x59A58E4:
SplashOutputDev::drawSoftMaskedImage(GfxState*, Object*, Stream*, int,
int, GfxImageColorMap*, Stream*, int, int, GfxImageColorMap*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13326==    by 0x59E9907: Gfx::doImage(Object*, Stream*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13326==    by 0x59ED8E6: Gfx::opXObject(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13326==    by 0x59DEA5C: Gfx::go(int) (in /usr/lib64/libpoppler.so.4.0.0)
==13326==    by 0x59E3015: Gfx::display(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13326==    by 0x59E5613: Gfx::doForm1(Object*, Dict*, double*,
double*, int, int, GfxColorSpace*, int, int, int, Function*, GfxColor*)
(in /usr/lib64/libpoppler.so.4.0.0)
==13326==    by 0x59ED4AB: Gfx::doForm(Object*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13326==  Address 0x982d11e40 is not stack'd, malloc'd or (recently) free'd

==13343== Invalid read of size 8
==13343==    at 0x5A6CECC: Splash::makeDashedPath(SplashPath*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x5A76B3F: Splash::stroke(SplashPath*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59A77CB: SplashOutputDev::stroke(GfxState*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59E6617: Gfx::opStroke(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59DEA5C: Gfx::go(int) (in /usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59E3015: Gfx::display(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x5A25B6F: Page::displaySlice(OutputDev*, double,
double, int, int, int, int, int, int, int, int, Catalog*, int
(*)(void*), void*, int (*)(Annot*, void*), void*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x40BBB8: pdf2jpg::GetSplash(int) (pdf2jpg.cpp:159)
==13343==    by 0x40BCF0: pdf2jpg::TopupJpegThreads(int, astring const&)
(pdf2jpg.cpp:140)
==13343==    by 0x40C555: pdf2jpg::Execute(int, char const*, char
const*, int) (pdf2jpg.cpp:84)
==13343==    by 0x406F18: Daemon::ExtractImages(int) (daemon.cpp:164)
==13343==    by 0x408BB3: Daemon::StartDaemon() (daemon.cpp:76)
==13343==  Address 0xa77b140 is 0 bytes after a block of size 8 alloc'd
==13343==    at 0x4C256AE: malloc (in
/usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
==13343==    by 0x5A5C544: gmalloc (in /usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x5A7E703: SplashState::setLineDash(double*, int,
double) (in /usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59A8609: SplashOutputDev::updateLineDash(GfxState*)
(in /usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59EAF4A: Gfx::opSetDash(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59DEA5C: Gfx::go(int) (in /usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59E3015: Gfx::display(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x5A25B6F: Page::displaySlice(OutputDev*, double,
double, int, int, int, int, int, int, int, int, Catalog*, int
(*)(void*), void*, int (*)(Annot*, void*), void*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x40BBB8: pdf2jpg::GetSplash(int) (pdf2jpg.cpp:159)
==13343==    by 0x40BCF0: pdf2jpg::TopupJpegThreads(int, astring const&)
(pdf2jpg.cpp:140)
==13343==    by 0x40C555: pdf2jpg::Execute(int, char const*, char
const*, int) (pdf2jpg.cpp:84)
==13343==    by 0x406F18: Daemon::ExtractImages(int) (daemon.cpp:164)
==13343==
==13343== Invalid read of size 8
==13343==    at 0x5A6CF62: Splash::makeDashedPath(SplashPath*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x5A76B3F: Splash::stroke(SplashPath*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59A77CB: SplashOutputDev::stroke(GfxState*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59E6617: Gfx::opStroke(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59DEA5C: Gfx::go(int) (in /usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59E3015: Gfx::display(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x5A25B6F: Page::displaySlice(OutputDev*, double,
double, int, int, int, int, int, int, int, int, Catalog*, int
(*)(void*), void*, int (*)(Annot*, void*), void*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x40BBB8: pdf2jpg::GetSplash(int) (pdf2jpg.cpp:159)
==13343==    by 0x40BCF0: pdf2jpg::TopupJpegThreads(int, astring const&)
(pdf2jpg.cpp:140)
==13343==    by 0x40C555: pdf2jpg::Execute(int, char const*, char
const*, int) (pdf2jpg.cpp:84)
==13343==    by 0x406F18: Daemon::ExtractImages(int) (daemon.cpp:164)
==13343==    by 0x408BB3: Daemon::StartDaemon() (daemon.cpp:76)
==13343==  Address 0xa77b150 is not stack'd, malloc'd or (recently) free'd
==13343==
==13343== Invalid read of size 8
==13343==    at 0x5A6D170: Splash::makeDashedPath(SplashPath*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x5A76B3F: Splash::stroke(SplashPath*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59A77CB: SplashOutputDev::stroke(GfxState*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59E6617: Gfx::opStroke(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59DEA5C: Gfx::go(int) (in /usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x59E3015: Gfx::display(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x5A25B6F: Page::displaySlice(OutputDev*, double,
double, int, int, int, int, int, int, int, int, Catalog*, int
(*)(void*), void*, int (*)(Annot*, void*), void*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13343==    by 0x40BBB8: pdf2jpg::GetSplash(int) (pdf2jpg.cpp:159)
==13343==    by 0x40BCF0: pdf2jpg::TopupJpegThreads(int, astring const&)
(pdf2jpg.cpp:140)
==13343==    by 0x40C555: pdf2jpg::Execute(int, char const*, char
const*, int) (pdf2jpg.cpp:84)
==13343==    by 0x406F18: Daemon::ExtractImages(int) (daemon.cpp:164)
==13343==    by 0x408BB3: Daemon::StartDaemon() (daemon.cpp:76)
==13343==  Address 0xa77b158 is not stack'd, malloc'd or (recently) free'd

==13369== Invalid read of size 8
==13369==    at 0x59ADF02: JPXStream::readTilePartData(unsigned,
unsigned, int) (in /usr/lib64/libpoppler.so.4.0.0)
==13369==    by 0x59AF00E: JPXStream::readTilePart() (in
/usr/lib64/libpoppler.so.4.0.0)
==13369==    by 0x59B09A4: JPXStream::readCodestream(unsigned) (in
/usr/lib64/libpoppler.so.4.0.0)
==13369==    by 0x59B2E1D: JPXStream::readBoxes() (in
/usr/lib64/libpoppler.so.4.0.0)
==13369==    by 0x59B2FA5: JPXStream::reset() (in
/usr/lib64/libpoppler.so.4.0.0)
==13369==    by 0x59A58E4:
SplashOutputDev::drawSoftMaskedImage(GfxState*, Object*, Stream*, int,
int, GfxImageColorMap*, Stream*, int, int, GfxImageColorMap*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13369==    by 0x59E9907: Gfx::doImage(Object*, Stream*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13369==    by 0x59ED8E6: Gfx::opXObject(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13369==    by 0x59DEA5C: Gfx::go(int) (in /usr/lib64/libpoppler.so.4.0.0)
==13369==    by 0x59E3015: Gfx::display(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13369==    by 0x59E5613: Gfx::doForm1(Object*, Dict*, double*,
double*, int, int, GfxColorSpace*, int, int, int, Function*, GfxColor*)
(in /usr/lib64/libpoppler.so.4.0.0)
==13369==    by 0x59ED4AB: Gfx::doForm(Object*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13369==  Address 0x65f2a10c8 is not stack'd, malloc'd or (recently) free'd

==13442== Invalid read of size 8
==13442==    at 0x59ABFFE: JPXStream::inverseTransform(JPXTileComp*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13442==    by 0x59B0A53: JPXStream::readCodestream(unsigned) (in
/usr/lib64/libpoppler.so.4.0.0)
==13442==    by 0x59B2E1D: JPXStream::readBoxes() (in
/usr/lib64/libpoppler.so.4.0.0)
==13442==    by 0x59B2FA5: JPXStream::reset() (in
/usr/lib64/libpoppler.so.4.0.0)
==13442==    by 0x59A56E7:
SplashOutputDev::drawSoftMaskedImage(GfxState*, Object*, Stream*, int,
int, GfxImageColorMap*, Stream*, int, int, GfxImageColorMap*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13442==    by 0x59E9907: Gfx::doImage(Object*, Stream*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13442==    by 0x59ED8E6: Gfx::opXObject(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13442==    by 0x59DEA5C: Gfx::go(int) (in /usr/lib64/libpoppler.so.4.0.0)
==13442==    by 0x59E3015: Gfx::display(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13442==    by 0x5A25B6F: Page::displaySlice(OutputDev*, double,
double, int, int, int, int, int, int, int, int, Catalog*, int
(*)(void*), void*, int (*)(Annot*, void*), void*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13442==    by 0x40BBB8: pdf2jpg::GetSplash(int) (pdf2jpg.cpp:159)
==13442==    by 0x40BCF0: pdf2jpg::TopupJpegThreads(int, astring const&)
(pdf2jpg.cpp:140)
==13442==  Address 0x10 is not stack'd, malloc'd or (recently) free'd

==13451== Invalid read of size 8
==13451==    at 0x59ADF02: JPXStream::readTilePartData(unsigned,
unsigned, int) (in /usr/lib64/libpoppler.so.4.0.0)
==13451==    by 0x59AF00E: JPXStream::readTilePart() (in
/usr/lib64/libpoppler.so.4.0.0)
==13451==    by 0x59B09A4: JPXStream::readCodestream(unsigned) (in
/usr/lib64/libpoppler.so.4.0.0)
==13451==    by 0x59B2E1D: JPXStream::readBoxes() (in
/usr/lib64/libpoppler.so.4.0.0)
==13451==    by 0x59B2FA5: JPXStream::reset() (in
/usr/lib64/libpoppler.so.4.0.0)
==13451==    by 0x59A56E7:
SplashOutputDev::drawSoftMaskedImage(GfxState*, Object*, Stream*, int,
int, GfxImageColorMap*, Stream*, int, int, GfxImageColorMap*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13451==    by 0x59E9907: Gfx::doImage(Object*, Stream*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13451==    by 0x59ED8E6: Gfx::opXObject(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13451==    by 0x59DEA5C: Gfx::go(int) (in /usr/lib64/libpoppler.so.4.0.0)
==13451==    by 0x59E3015: Gfx::display(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13451==    by 0x5A25B6F: Page::displaySlice(OutputDev*, double,
double, int, int, int, int, int, int, int, int, Catalog*, int
(*)(void*), void*, int (*)(Annot*, void*), void*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13451==    by 0x40BBB8: pdf2jpg::GetSplash(int) (pdf2jpg.cpp:159)
==13451==  Address 0x1eca44ae10 is not stack'd, malloc'd or (recently)
free'd

==13495== Invalid read of size 8
==13495==    at 0x59ABFFE: JPXStream::inverseTransform(JPXTileComp*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13495==    by 0x59B0A53: JPXStream::readCodestream(unsigned) (in
/usr/lib64/libpoppler.so.4.0.0)
==13495==    by 0x59B2E1D: JPXStream::readBoxes() (in
/usr/lib64/libpoppler.so.4.0.0)
==13495==    by 0x59B2FA5: JPXStream::reset() (in
/usr/lib64/libpoppler.so.4.0.0)
==13495==    by 0x59A56E7:
SplashOutputDev::drawSoftMaskedImage(GfxState*, Object*, Stream*, int,
int, GfxImageColorMap*, Stream*, int, int, GfxImageColorMap*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13495==    by 0x59E9907: Gfx::doImage(Object*, Stream*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13495==    by 0x59ED8E6: Gfx::opXObject(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13495==    by 0x59DEA5C: Gfx::go(int) (in /usr/lib64/libpoppler.so.4.0.0)
==13495==    by 0x59E3015: Gfx::display(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13495==    by 0x5A25B6F: Page::displaySlice(OutputDev*, double,
double, int, int, int, int, int, int, int, int, Catalog*, int
(*)(void*), void*, int (*)(Annot*, void*), void*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13495==    by 0x40BBB8: pdf2jpg::GetSplash(int) (pdf2jpg.cpp:159)
==13495==    by 0x40BCF0: pdf2jpg::TopupJpegThreads(int, astring const&)
(pdf2jpg.cpp:140)
==13495==  Address 0x10 is not stack'd, malloc'd or (recently) free'd

==13500== Invalid read of size 8
==13500==    at 0x59ADF12: JPXStream::readTilePartData(unsigned,
unsigned, int) (in /usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59AF00E: JPXStream::readTilePart() (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59B09A4: JPXStream::readCodestream(unsigned) (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59B2E1D: JPXStream::readBoxes() (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59B2FA5: JPXStream::reset() (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59A618F: SplashOutputDev::drawImage(GfxState*,
Object*, Stream*, int, int, GfxImageColorMap*, int*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59E9119: Gfx::doImage(Object*, Stream*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59ED8E6: Gfx::opXObject(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59DEA5C: Gfx::go(int) (in /usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59E3015: Gfx::display(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x5A25B6F: Page::displaySlice(OutputDev*, double,
double, int, int, int, int, int, int, int, int, Catalog*, int
(*)(void*), void*, int (*)(Annot*, void*), void*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x40BBB8: pdf2jpg::GetSplash(int) (pdf2jpg.cpp:159)
==13500==  Address 0x9bc1930 is 0 bytes inside a block of size 6 alloc'd
==13500==    at 0x4C256AE: malloc (in
/usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
==13500==    by 0x9057AA3: FcStrCopy (in /usr/lib64/libfontconfig.so.1.3.0)
==13500==    by 0x9058E6F: (within /usr/lib64/libfontconfig.so.1.3.0)
==13500==    by 0x905AAE5: (within /usr/lib64/libfontconfig.so.1.3.0)
==13500==    by 0x532C9EC: doContent (in
/usr/local/lib/libPdfOptimizeAPI.so)
==13500==    by 0x532BF85: contentProcessor (in
/usr/local/lib/libPdfOptimizeAPI.so)
==13500==    by 0x532E58F: doProlog (in /usr/local/lib/libPdfOptimizeAPI.so)
==13500==    by 0x532E3D6: prologProcessor (in
/usr/local/lib/libPdfOptimizeAPI.so)
==13500==    by 0x532B8A2: XML_ParseBuffer (in
/usr/local/lib/libPdfOptimizeAPI.so)
==13500==    by 0x9059508: FcConfigParseAndLoad (in
/usr/lib64/libfontconfig.so.1.3.0)
==13500==    by 0x90597ED: FcConfigParseAndLoad (in
/usr/lib64/libfontconfig.so.1.3.0)
==13500==    by 0x905AC44: (within /usr/lib64/libfontconfig.so.1.3.0)

==13500== Invalid read of size 8
==13500==    at 0x59ADF97: JPXStream::readTilePartData(unsigned,
unsigned, int) (in /usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59AF00E: JPXStream::readTilePart() (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59B09A4: JPXStream::readCodestream(unsigned) (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59B2E1D: JPXStream::readBoxes() (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59B2FA5: JPXStream::reset() (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59A618F: SplashOutputDev::drawImage(GfxState*,
Object*, Stream*, int, int, GfxImageColorMap*, int*, int)
(in/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59E9119: Gfx::doImage(Object*, Stream*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59ED8E6: Gfx::opXObject(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59DEA5C: Gfx::go(int) (in /usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x59E3015: Gfx::display(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x5A25B6F: Page::displaySlice(OutputDev*, double,
double, int, int, int, int, int, int, int, int, Catalog*, int
(*)(void*), void*, int (*)(Annot*, void*), void*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13500==    by 0x40BBB8: pdf2jpg::GetSplash(int) (pdf2jpg.cpp:159)
==13500==  Address 0x47554c4c94 is not stack'd, malloc'd or (recently)
free'd

==13721== Invalid read of size 8
==13721==    at 0x59ADF97: JPXStream::readTilePartData(unsigned,
unsigned, int) (in /usr/lib64/libpoppler.so.4.0.0)
==13721==    by 0x59AF00E: JPXStream::readTilePart() (in
/usr/lib64/libpoppler.so.4.0.0)
==13721==    by 0x59B09A4: JPXStream::readCodestream(unsigned) (in
/usr/lib64/libpoppler.so.4.0.0)
==13721==    by 0x59B2E1D: JPXStream::readBoxes() (in
/usr/lib64/libpoppler.so.4.0.0)
==13721==    by 0x59B2FA5: JPXStream::reset() (in
/usr/lib64/libpoppler.so.4.0.0)
==13721==    by 0x59A618F: SplashOutputDev::drawImage(GfxState*,
Object*, Stream*, int, int, GfxImageColorMap*, int*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13721==    by 0x59E9119: Gfx::doImage(Object*, Stream*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13721==    by 0x59ED8E6: Gfx::opXObject(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13721==    by 0x59DEA5C: Gfx::go(int) (in /usr/lib64/libpoppler.so.4.0.0)
==13721==    by 0x59E3015: Gfx::display(Object*, int) (in
/usr/lib64/libpoppler.so.4.0.0)
==13721==    by 0x59E5613: Gfx::doForm1(Object*, Dict*, double*,
double*, int, int, GfxColorSpace*, int, int, int, Function*, GfxColor*)
(in /usr/lib64/libpoppler.so.4.0.0)
==13721==    by 0x59ED4AB: Gfx::doForm(Object*) (in
/usr/lib64/libpoppler.so.4.0.0)
==13721==  Address 0x10 is not stack'd, malloc'd or (recently) free'd



More information about the poppler mailing list