Blame texlive-base-20210325-pdftoepdf-fix-crash.patch

6ab6f75
diff -up texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc.debug texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc
6ab6f75
--- texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc.debug	2022-01-20 10:25:58.454233201 -0500
6ab6f75
+++ texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc	2022-01-20 12:57:04.241513707 -0500
6ab6f75
@@ -962,21 +962,30 @@ A change
6ab6f75
 does not improve the situation.
6ab6f75
 The changes below seem to work fine. 
6ab6f75
 */
6ab6f75
+            if (page->getGroup() != NULL) {
6ab6f75
+                groupDict = Object(page->getGroup());
6ab6f75
+            } else {
6ab6f75
+                pdftex_fail("PDF inclusion: getGroup failed");
6ab6f75
+            }
6ab6f75
+/*
6ab6f75
 // begin modification
6ab6f75
             groupDict = pageDict->lookup("Group");
6ab6f75
             Dict *dic1 = page->getGroup();
6ab6f75
             Dict *dic2 = groupDict.getDict();
6ab6f75
             // replace dic2 in groupDict with dic1
6ab6f75
             l = dic2->getLength();
6ab6f75
+            pdftex_warn("dic2 length is %d", l);
6ab6f75
             for (i = 0; i < l; i++) {
6ab6f75
                 groupDict.dictRemove(dic2->getKey(i));
6ab6f75
             }
6ab6f75
             l = dic1->getLength();
6ab6f75
+            pdftex_warn("dic1 length is %d", l);
6ab6f75
             for (i = 0; i < l; i++) {
6ab6f75
                 groupDict.dictAdd(dic1->getKey(i),
6ab6f75
                                   dic1->getValNF(i).copy());
6ab6f75
             }
6ab6f75
 // end modification
6ab6f75
+*/
6ab6f75
             pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval);
6ab6f75
         }
6ab6f75
     }