c2e870
--- poppler-0.26.5/utils/pdfunite.cc.the	2014-07-25 00:28:01.000000000 +0200
c2e870
+++ poppler-0.26.5/utils/pdfunite.cc	2019-02-20 11:37:39.405536641 +0100
c2e870
@@ -80,6 +80,12 @@ int main (int argc, char *argv[])
c2e870
     GooString *gfileName = new GooString(argv[i]);
c2e870
     PDFDoc *doc = new PDFDoc(gfileName, NULL, NULL, NULL);
c2e870
     if (doc->isOk() && !doc->isEncrypted()) {
c2e870
+      for (j = 1; j <= doc->getNumPages(); j++) {
c2e870
+        if (doc->getCatalog()->getPage(j) == NULL) {
c2e870
+          error(errSyntaxError, -1, "Page number {0:d} is missing in '{1:s}')", j, argv[i]);
c2e870
+          return -1;
c2e870
+        }
c2e870
+      }
c2e870
       docs.push_back(doc);
c2e870
       if (doc->getPDFMajorVersion() > majorVersion) {
c2e870
         majorVersion = doc->getPDFMajorVersion();