[poppler] poppler/GfxState.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Aug 24 16:24:02 UTC 2019


 poppler/GfxState.cc |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit a2f2f3b91fb007b0c17090d369179e7605c9a4b7
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sat Aug 24 18:17:10 2019 +0200

    GfxDeviceNColorSpace::parse: Only add to separationList if non null
    
    Fixes crash with bug-poppler85281.pdf

diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index f7810cb8..41d77ae4 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -3051,7 +3051,10 @@ GfxColorSpace *GfxDeviceNColorSpace::parse(GfxResources *res, Array *arr, Output
       for (i = 0; i < colorants->getLength(); i++) {
         Object obj3 = colorants->getVal(i);
         if (obj3.isArray()) {
-	  separationList->push_back((GfxSeparationColorSpace*)GfxSeparationColorSpace::parse(res, obj3.getArray(), out, state, recursion));
+	  GfxSeparationColorSpace *cs = (GfxSeparationColorSpace*)GfxSeparationColorSpace::parse(res, obj3.getArray(), out, state, recursion);
+	  if (cs) {
+	    separationList->push_back(cs);
+	  }
         } else {
           error(errSyntaxWarning, -1, "Bad DeviceN color space (colorant value entry is not an Array)");
           goto err5;


More information about the poppler mailing list