File poppler-annot-form-transparent-color.patch of Package poppler.23804

Index: poppler/Annot.cc
===================================================================
--- poppler/Annot.cc.orig	2014-08-21 21:39:53.000000000 +0200
+++ poppler/Annot.cc	2015-02-10 16:00:51.313836355 +0100
@@ -1045,14 +1045,24 @@
   obj1.free();
 
   if (dict->lookup("BC", &obj1)->isArray()) {
-    borderColor = new AnnotColor(obj1.getArray());
+    Array *colorComponents = obj1.getArray();
+    if (colorComponents->getLength() > 0) {
+      borderColor = new AnnotColor(colorComponents);
+    } else {
+      borderColor = NULL;
+    }
   } else {
     borderColor = NULL;
   }
   obj1.free();
 
   if (dict->lookup("BG", &obj1)->isArray()) {
-    backColor = new AnnotColor(obj1.getArray());
+    Array *colorComponents = obj1.getArray();
+    if (colorComponents->getLength() > 0) {
+      backColor = new AnnotColor(colorComponents);
+    } else {
+      backColor = NULL;
+    }
   } else {
     backColor = NULL;
   }
openSUSE Build Service is sponsored by