From 6d5a35324d49856569788bc4e471cc245f5a0774 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Wed, 21 Sep 2016 12:28:16 +0200 Subject: [PATCH] Don't crash when calling cmsGetColorSpace() Initialize RGBProfile and displayProfile before their use if they were not initialized in GfxState's constructor. https://bugs.freedesktop.org/show_bug.cgi?id=97870 --- poppler/GfxState.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc index 368ee27..b617012 100644 --- a/poppler/GfxState.cc +++ b/poppler/GfxState.cc @@ -2049,6 +2049,7 @@ GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, OutputDev *out, GfxState if (hp == 0) { error(errSyntaxWarning, -1, "read ICCBased color space profile error"); } else { + GfxColorSpace::setupColorProfiles(); cmsHPROFILE dhp = (state != NULL && state->getDisplayProfile() != NULL) ? state->getDisplayProfile() : displayProfile; if (dhp == NULL) dhp = RGBProfile; unsigned int cst = getCMSColorSpaceType(cmsGetColorSpace(hp)); -- 2.9.3