Commit ee44aef8d08d8f745380277412ec8bb420648a7c

Authored by Jay Berkenbilt
1 parent 6fe1e9de

Treat loop in xref tables as damage (fixes #192)

Prior to this fix, if there was a loop detected in following /Prev
pointers in xref streams/tables, it would cause qpdf to lose data.
Note that this condition causes many PDF readers to hang or fail.
ChangeLog
  1 +2018-03-05 Jay Berkenbilt <ejb@ql.org>
  2 +
  3 + * Improve handling of loops while following cross reference
  4 + tables. Fixes #192.
  5 +
1 2018-03-04 Jay Berkenbilt <ejb@ql.org> 6 2018-03-04 Jay Berkenbilt <ejb@ql.org>
2 7
3 * 8.0.1: release 8 * 8.0.1: release
libqpdf/QPDF.cc
@@ -532,7 +532,9 @@ QPDF::read_xref(qpdf_offset_t xref_offset) @@ -532,7 +532,9 @@ QPDF::read_xref(qpdf_offset_t xref_offset)
532 } 532 }
533 if (visited.count(xref_offset) != 0) 533 if (visited.count(xref_offset) != 0)
534 { 534 {
535 - xref_offset = 0; 535 + QTC::TC("qpdf", "QPDF xref loop");
  536 + throw QPDFExc(qpdf_e_damaged_pdf, this->m->file->getName(), "", 0,
  537 + "loop detected following xref tables");
536 } 538 }
537 } 539 }
538 540
qpdf/qpdf.testcov
@@ -334,3 +334,4 @@ QPDFObjectHandle dictionary ignoring removereplace 0 @@ -334,3 +334,4 @@ QPDFObjectHandle dictionary ignoring removereplace 0
334 QPDFObjectHandle numeric non-numeric 0 334 QPDFObjectHandle numeric non-numeric 0
335 QPDFObjectHandle erase array bounds 0 335 QPDFObjectHandle erase array bounds 0
336 qpdf-c called qpdf_check_pdf 0 336 qpdf-c called qpdf_check_pdf 0
  337 +QPDF xref loop 0
qpdf/qtest/qpdf.test
@@ -1400,7 +1400,7 @@ $td-&gt;runtest(&quot;C API: no recovery&quot;, @@ -1400,7 +1400,7 @@ $td-&gt;runtest(&quot;C API: no recovery&quot;,
1400 show_ntests(); 1400 show_ntests();
1401 # ---------- 1401 # ----------
1402 $td->notify("--- Recovery Tests ---"); 1402 $td->notify("--- Recovery Tests ---");
1403 -$n_tests += @badfiles + 7; 1403 +$n_tests += @badfiles + 9;
1404 1404
1405 # Recovery tests. These are mostly after-the-fact -- when recovery 1405 # Recovery tests. These are mostly after-the-fact -- when recovery
1406 # was implemented, some degree of recovery was possible on many of the 1406 # was implemented, some degree of recovery was possible on many of the
@@ -1469,6 +1469,17 @@ $td-&gt;runtest(&quot;recoverable xref errors&quot;, @@ -1469,6 +1469,17 @@ $td-&gt;runtest(&quot;recoverable xref errors&quot;,
1469 $td->EXIT_STATUS => 3}, 1469 $td->EXIT_STATUS => 3},
1470 $td->NORMALIZE_NEWLINES); 1470 $td->NORMALIZE_NEWLINES);
1471 1471
  1472 +$td->runtest("xref loop with append",
  1473 + {$td->COMMAND =>
  1474 + "qpdf --deterministic-id append-xref-loop.pdf a.pdf"},
  1475 + {$td->FILE => "append-xref-loop.out",
  1476 + $td->EXIT_STATUS => 3},
  1477 + $td->NORMALIZE_NEWLINES);
  1478 +
  1479 +$td->runtest("check output",
  1480 + {$td->FILE => "a.pdf"},
  1481 + {$td->FILE => "append-xref-loop-fixed.pdf"});
  1482 +
1472 show_ntests(); 1483 show_ntests();
1473 # ---------- 1484 # ----------
1474 $td->notify("--- Basic Parsing Tests ---"); 1485 $td->notify("--- Basic Parsing Tests ---");
qpdf/qtest/qpdf/append-xref-loop-fixed.pdf 0 → 100644
No preview for this file type
qpdf/qtest/qpdf/append-xref-loop.out 0 → 100644
  1 +WARNING: append-xref-loop.pdf: file is damaged
  2 +WARNING: append-xref-loop.pdf: loop detected following xref tables
  3 +WARNING: append-xref-loop.pdf: Attempting to reconstruct cross-reference table
  4 +qpdf: operation succeeded with warnings; resulting file may have some problems
qpdf/qtest/qpdf/append-xref-loop.pdf 0 → 100644
  1 +%PDF-1.3
  2 +%¿÷¢þ
  3 +%QDF-1.0
  4 +
  5 +1 0 obj
  6 +<<
  7 + /PageLabels 107 0 R
  8 + /Pages 2 0 R
  9 + /Type /Catalog
  10 + /PageMode /UseOutlines
  11 + /Outlines 95 0 R
  12 +>>
  13 +endobj
  14 +
  15 +2 0 obj
  16 +<<
  17 + /Count 30
  18 + /Kids [
  19 + 3 0 R
  20 + 4 0 R
  21 + 5 0 R
  22 + 6 0 R
  23 + 7 0 R
  24 + 8 0 R
  25 + 9 0 R
  26 + 10 0 R
  27 + 11 0 R
  28 + 12 0 R
  29 + 13 0 R
  30 + 14 0 R
  31 + 15 0 R
  32 + 16 0 R
  33 + 17 0 R
  34 + 18 0 R
  35 + 19 0 R
  36 + 20 0 R
  37 + 21 0 R
  38 + 22 0 R
  39 + 23 0 R
  40 + 24 0 R
  41 + 25 0 R
  42 + 26 0 R
  43 + 27 0 R
  44 + 28 0 R
  45 + 29 0 R
  46 + 30 0 R
  47 + 31 0 R
  48 + 32 0 R
  49 + ]
  50 + /Type /Pages
  51 +>>
  52 +endobj
  53 +
  54 +%% Page 1
  55 +3 0 obj
  56 +<<
  57 + /Contents 33 0 R
  58 + /MediaBox [
  59 + 0
  60 + 0
  61 + 612
  62 + 792
  63 + ]
  64 + /Parent 2 0 R
  65 + /Resources <<
  66 + /Font <<
  67 + /F1 35 0 R
  68 + >>
  69 + /ProcSet 36 0 R
  70 + >>
  71 + /Type /Page
  72 +>>
  73 +endobj
  74 +
  75 +%% Page 2
  76 +4 0 obj
  77 +<<
  78 + /Contents 37 0 R
  79 + /MediaBox [
  80 + 0
  81 + 0
  82 + 612
  83 + 792
  84 + ]
  85 + /Parent 2 0 R
  86 + /Resources <<
  87 + /Font <<
  88 + /F1 35 0 R
  89 + >>
  90 + /ProcSet 36 0 R
  91 + >>
  92 + /Type /Page
  93 +>>
  94 +endobj
  95 +
  96 +%% Page 3
  97 +5 0 obj
  98 +<<
  99 + /Contents 39 0 R
  100 + /MediaBox [
  101 + 0
  102 + 0
  103 + 612
  104 + 792
  105 + ]
  106 + /Parent 2 0 R
  107 + /Resources <<
  108 + /Font <<
  109 + /F1 35 0 R
  110 + >>
  111 + /ProcSet 36 0 R
  112 + >>
  113 + /Type /Page
  114 +>>
  115 +endobj
  116 +
  117 +%% Page 4
  118 +6 0 obj
  119 +<<
  120 + /Contents 41 0 R
  121 + /MediaBox [
  122 + 0
  123 + 0
  124 + 612
  125 + 792
  126 + ]
  127 + /Parent 2 0 R
  128 + /Resources <<
  129 + /Font <<
  130 + /F1 35 0 R
  131 + >>
  132 + /ProcSet 36 0 R
  133 + >>
  134 + /Type /Page
  135 +>>
  136 +endobj
  137 +
  138 +%% Page 5
  139 +7 0 obj
  140 +<<
  141 + /Contents 43 0 R
  142 + /MediaBox [
  143 + 0
  144 + 0
  145 + 612
  146 + 792
  147 + ]
  148 + /Parent 2 0 R
  149 + /Resources <<
  150 + /Font <<
  151 + /F1 35 0 R
  152 + >>
  153 + /ProcSet 36 0 R
  154 + >>
  155 + /Type /Page
  156 +>>
  157 +endobj
  158 +
  159 +%% Page 6
  160 +8 0 obj
  161 +<<
  162 + /Contents 45 0 R
  163 + /MediaBox [
  164 + 0
  165 + 0
  166 + 612
  167 + 792
  168 + ]
  169 + /Parent 2 0 R
  170 + /Resources <<
  171 + /Font <<
  172 + /F1 35 0 R
  173 + >>
  174 + /ProcSet 36 0 R
  175 + >>
  176 + /Type /Page
  177 +>>
  178 +endobj
  179 +
  180 +%% Page 7
  181 +9 0 obj
  182 +<<
  183 + /Contents 47 0 R
  184 + /MediaBox [
  185 + 0
  186 + 0
  187 + 612
  188 + 792
  189 + ]
  190 + /Parent 2 0 R
  191 + /Resources <<
  192 + /Font <<
  193 + /F1 35 0 R
  194 + >>
  195 + /ProcSet 36 0 R
  196 + >>
  197 + /Type /Page
  198 +>>
  199 +endobj
  200 +
  201 +%% Page 8
  202 +10 0 obj
  203 +<<
  204 + /Contents 49 0 R
  205 + /MediaBox [
  206 + 0
  207 + 0
  208 + 612
  209 + 792
  210 + ]
  211 + /Parent 2 0 R
  212 + /Resources <<
  213 + /Font <<
  214 + /F1 35 0 R
  215 + >>
  216 + /ProcSet 36 0 R
  217 + >>
  218 + /Type /Page
  219 +>>
  220 +endobj
  221 +
  222 +%% Page 9
  223 +11 0 obj
  224 +<<
  225 + /Contents 51 0 R
  226 + /MediaBox [
  227 + 0
  228 + 0
  229 + 612
  230 + 792
  231 + ]
  232 + /Parent 2 0 R
  233 + /Resources <<
  234 + /Font <<
  235 + /F1 35 0 R
  236 + >>
  237 + /ProcSet 36 0 R
  238 + >>
  239 + /Type /Page
  240 +>>
  241 +endobj
  242 +
  243 +%% Page 10
  244 +12 0 obj
  245 +<<
  246 + /Contents 53 0 R
  247 + /MediaBox [
  248 + 0
  249 + 0
  250 + 612
  251 + 792
  252 + ]
  253 + /Parent 2 0 R
  254 + /Resources <<
  255 + /Font <<
  256 + /F1 35 0 R
  257 + >>
  258 + /ProcSet 36 0 R
  259 + >>
  260 + /Type /Page
  261 +>>
  262 +endobj
  263 +
  264 +%% Page 11
  265 +13 0 obj
  266 +<<
  267 + /Contents 55 0 R
  268 + /MediaBox [
  269 + 0
  270 + 0
  271 + 612
  272 + 792
  273 + ]
  274 + /Parent 2 0 R
  275 + /Resources <<
  276 + /Font <<
  277 + /F1 35 0 R
  278 + >>
  279 + /ProcSet 36 0 R
  280 + >>
  281 + /Type /Page
  282 +>>
  283 +endobj
  284 +
  285 +%% Page 12
  286 +14 0 obj
  287 +<<
  288 + /Contents 57 0 R
  289 + /MediaBox [
  290 + 0
  291 + 0
  292 + 612
  293 + 792
  294 + ]
  295 + /Parent 2 0 R
  296 + /Resources <<
  297 + /Font <<
  298 + /F1 35 0 R
  299 + >>
  300 + /ProcSet 36 0 R
  301 + >>
  302 + /Type /Page
  303 +>>
  304 +endobj
  305 +
  306 +%% Page 13
  307 +15 0 obj
  308 +<<
  309 + /Contents 59 0 R
  310 + /MediaBox [
  311 + 0
  312 + 0
  313 + 612
  314 + 792
  315 + ]
  316 + /Parent 2 0 R
  317 + /Resources <<
  318 + /Font <<
  319 + /F1 35 0 R
  320 + >>
  321 + /ProcSet 36 0 R
  322 + >>
  323 + /Type /Page
  324 +>>
  325 +endobj
  326 +
  327 +%% Page 14
  328 +16 0 obj
  329 +<<
  330 + /Contents 61 0 R
  331 + /MediaBox [
  332 + 0
  333 + 0
  334 + 612
  335 + 792
  336 + ]
  337 + /Parent 2 0 R
  338 + /Resources <<
  339 + /Font <<
  340 + /F1 35 0 R
  341 + >>
  342 + /ProcSet 36 0 R
  343 + >>
  344 + /Type /Page
  345 +>>
  346 +endobj
  347 +
  348 +%% Page 15
  349 +17 0 obj
  350 +<<
  351 + /Contents 63 0 R
  352 + /MediaBox [
  353 + 0
  354 + 0
  355 + 612
  356 + 792
  357 + ]
  358 + /Parent 2 0 R
  359 + /Resources <<
  360 + /Font <<
  361 + /F1 35 0 R
  362 + >>
  363 + /ProcSet 36 0 R
  364 + >>
  365 + /Type /Page
  366 +>>
  367 +endobj
  368 +
  369 +%% Page 16
  370 +18 0 obj
  371 +<<
  372 + /Contents 65 0 R
  373 + /MediaBox [
  374 + 0
  375 + 0
  376 + 612
  377 + 792
  378 + ]
  379 + /Parent 2 0 R
  380 + /Resources <<
  381 + /Font <<
  382 + /F1 35 0 R
  383 + >>
  384 + /ProcSet 36 0 R
  385 + >>
  386 + /Type /Page
  387 +>>
  388 +endobj
  389 +
  390 +%% Page 17
  391 +19 0 obj
  392 +<<
  393 + /Contents 67 0 R
  394 + /MediaBox [
  395 + 0
  396 + 0
  397 + 612
  398 + 792
  399 + ]
  400 + /Parent 2 0 R
  401 + /Resources <<
  402 + /Font <<
  403 + /F1 35 0 R
  404 + >>
  405 + /ProcSet 36 0 R
  406 + >>
  407 + /Type /Page
  408 +>>
  409 +endobj
  410 +
  411 +%% Page 18
  412 +20 0 obj
  413 +<<
  414 + /Contents 69 0 R
  415 + /MediaBox [
  416 + 0
  417 + 0
  418 + 612
  419 + 792
  420 + ]
  421 + /Parent 2 0 R
  422 + /Resources <<
  423 + /Font <<
  424 + /F1 35 0 R
  425 + >>
  426 + /ProcSet 36 0 R
  427 + >>
  428 + /Type /Page
  429 +>>
  430 +endobj
  431 +
  432 +%% Page 19
  433 +21 0 obj
  434 +<<
  435 + /Contents 71 0 R
  436 + /MediaBox [
  437 + 0
  438 + 0
  439 + 612
  440 + 792
  441 + ]
  442 + /Parent 2 0 R
  443 + /Resources <<
  444 + /Font <<
  445 + /F1 35 0 R
  446 + >>
  447 + /ProcSet 36 0 R
  448 + >>
  449 + /Type /Page
  450 +>>
  451 +endobj
  452 +
  453 +%% Page 20
  454 +22 0 obj
  455 +<<
  456 + /Contents 73 0 R
  457 + /MediaBox [
  458 + 0
  459 + 0
  460 + 612
  461 + 792
  462 + ]
  463 + /Parent 2 0 R
  464 + /Resources <<
  465 + /Font <<
  466 + /F1 35 0 R
  467 + >>
  468 + /ProcSet 36 0 R
  469 + >>
  470 + /Type /Page
  471 +>>
  472 +endobj
  473 +
  474 +%% Page 21
  475 +23 0 obj
  476 +<<
  477 + /Contents 75 0 R
  478 + /MediaBox [
  479 + 0
  480 + 0
  481 + 612
  482 + 792
  483 + ]
  484 + /Parent 2 0 R
  485 + /Resources <<
  486 + /Font <<
  487 + /F1 35 0 R
  488 + >>
  489 + /ProcSet 36 0 R
  490 + >>
  491 + /Type /Page
  492 +>>
  493 +endobj
  494 +
  495 +%% Page 22
  496 +24 0 obj
  497 +<<
  498 + /Contents 77 0 R
  499 + /MediaBox [
  500 + 0
  501 + 0
  502 + 612
  503 + 792
  504 + ]
  505 + /Parent 2 0 R
  506 + /Resources <<
  507 + /Font <<
  508 + /F1 35 0 R
  509 + >>
  510 + /ProcSet 36 0 R
  511 + >>
  512 + /Type /Page
  513 +>>
  514 +endobj
  515 +
  516 +%% Page 23
  517 +25 0 obj
  518 +<<
  519 + /Contents 79 0 R
  520 + /MediaBox [
  521 + 0
  522 + 0
  523 + 612
  524 + 792
  525 + ]
  526 + /Parent 2 0 R
  527 + /Resources <<
  528 + /Font <<
  529 + /F1 35 0 R
  530 + >>
  531 + /ProcSet 36 0 R
  532 + >>
  533 + /Type /Page
  534 +>>
  535 +endobj
  536 +
  537 +%% Page 24
  538 +26 0 obj
  539 +<<
  540 + /Contents 81 0 R
  541 + /MediaBox [
  542 + 0
  543 + 0
  544 + 612
  545 + 792
  546 + ]
  547 + /Parent 2 0 R
  548 + /Resources <<
  549 + /Font <<
  550 + /F1 35 0 R
  551 + >>
  552 + /ProcSet 36 0 R
  553 + >>
  554 + /Type /Page
  555 +>>
  556 +endobj
  557 +
  558 +%% Page 25
  559 +27 0 obj
  560 +<<
  561 + /Contents 83 0 R
  562 + /MediaBox [
  563 + 0
  564 + 0
  565 + 612
  566 + 792
  567 + ]
  568 + /Parent 2 0 R
  569 + /Resources <<
  570 + /Font <<
  571 + /F1 35 0 R
  572 + >>
  573 + /ProcSet 36 0 R
  574 + >>
  575 + /Type /Page
  576 +>>
  577 +endobj
  578 +
  579 +%% Page 26
  580 +28 0 obj
  581 +<<
  582 + /Contents 85 0 R
  583 + /MediaBox [
  584 + 0
  585 + 0
  586 + 612
  587 + 792
  588 + ]
  589 + /Parent 2 0 R
  590 + /Resources <<
  591 + /Font <<
  592 + /F1 35 0 R
  593 + >>
  594 + /ProcSet 36 0 R
  595 + >>
  596 + /Type /Page
  597 +>>
  598 +endobj
  599 +
  600 +%% Page 27
  601 +29 0 obj
  602 +<<
  603 + /Contents 87 0 R
  604 + /MediaBox [
  605 + 0
  606 + 0
  607 + 612
  608 + 792
  609 + ]
  610 + /Parent 2 0 R
  611 + /Resources <<
  612 + /Font <<
  613 + /F1 35 0 R
  614 + >>
  615 + /ProcSet 36 0 R
  616 + >>
  617 + /Type /Page
  618 +>>
  619 +endobj
  620 +
  621 +%% Page 28
  622 +30 0 obj
  623 +<<
  624 + /Contents 89 0 R
  625 + /MediaBox [
  626 + 0
  627 + 0
  628 + 612
  629 + 792
  630 + ]
  631 + /Parent 2 0 R
  632 + /Resources <<
  633 + /Font <<
  634 + /F1 35 0 R
  635 + >>
  636 + /ProcSet 36 0 R
  637 + >>
  638 + /Type /Page
  639 +>>
  640 +endobj
  641 +
  642 +%% Page 29
  643 +31 0 obj
  644 +<<
  645 + /Contents 91 0 R
  646 + /MediaBox [
  647 + 0
  648 + 0
  649 + 612
  650 + 792
  651 + ]
  652 + /Parent 2 0 R
  653 + /Resources <<
  654 + /Font <<
  655 + /F1 35 0 R
  656 + >>
  657 + /ProcSet 36 0 R
  658 + >>
  659 + /Type /Page
  660 +>>
  661 +endobj
  662 +
  663 +%% Page 30
  664 +32 0 obj
  665 +<<
  666 + /Contents 93 0 R
  667 + /MediaBox [
  668 + 0
  669 + 0
  670 + 612
  671 + 792
  672 + ]
  673 + /Parent 2 0 R
  674 + /Resources <<
  675 + /Font <<
  676 + /F1 35 0 R
  677 + >>
  678 + /ProcSet 36 0 R
  679 + >>
  680 + /Type /Page
  681 +>>
  682 +endobj
  683 +
  684 +%% Contents for page 1
  685 +33 0 obj
  686 +<<
  687 + /Length 34 0 R
  688 +>>
  689 +stream
  690 +BT
  691 + /F1 24 Tf
  692 + 72 720 Td
  693 + (Potato 0) Tj
  694 +ET
  695 +endstream
  696 +endobj
  697 +
  698 +34 0 obj
  699 +46
  700 +endobj
  701 +
  702 +35 0 obj
  703 +<<
  704 + /BaseFont /Helvetica
  705 + /Encoding /WinAnsiEncoding
  706 + /Name /F1
  707 + /Subtype /Type1
  708 + /Type /Font
  709 +>>
  710 +endobj
  711 +
  712 +36 0 obj
  713 +[
  714 + /PDF
  715 + /Text
  716 +]
  717 +endobj
  718 +
  719 +%% Contents for page 2
  720 +37 0 obj
  721 +<<
  722 + /Length 38 0 R
  723 +>>
  724 +stream
  725 +BT
  726 + /F1 24 Tf
  727 + 72 720 Td
  728 + (Potato 1) Tj
  729 +ET
  730 +endstream
  731 +endobj
  732 +
  733 +38 0 obj
  734 +46
  735 +endobj
  736 +
  737 +%% Contents for page 3
  738 +39 0 obj
  739 +<<
  740 + /Length 40 0 R
  741 +>>
  742 +stream
  743 +BT
  744 + /F1 24 Tf
  745 + 72 720 Td
  746 + (Potato 2) Tj
  747 +ET
  748 +endstream
  749 +endobj
  750 +
  751 +40 0 obj
  752 +46
  753 +endobj
  754 +
  755 +%% Contents for page 4
  756 +41 0 obj
  757 +<<
  758 + /Length 42 0 R
  759 +>>
  760 +stream
  761 +BT
  762 + /F1 24 Tf
  763 + 72 720 Td
  764 + (Potato 3) Tj
  765 +ET
  766 +endstream
  767 +endobj
  768 +
  769 +42 0 obj
  770 +46
  771 +endobj
  772 +
  773 +%% Contents for page 5
  774 +43 0 obj
  775 +<<
  776 + /Length 44 0 R
  777 +>>
  778 +stream
  779 +BT
  780 + /F1 24 Tf
  781 + 72 720 Td
  782 + (Potato 4) Tj
  783 +ET
  784 +endstream
  785 +endobj
  786 +
  787 +44 0 obj
  788 +46
  789 +endobj
  790 +
  791 +%% Contents for page 6
  792 +45 0 obj
  793 +<<
  794 + /Length 46 0 R
  795 +>>
  796 +stream
  797 +BT
  798 + /F1 24 Tf
  799 + 72 720 Td
  800 + (Potato 5) Tj
  801 +ET
  802 +endstream
  803 +endobj
  804 +
  805 +46 0 obj
  806 +46
  807 +endobj
  808 +
  809 +%% Contents for page 7
  810 +47 0 obj
  811 +<<
  812 + /Length 48 0 R
  813 +>>
  814 +stream
  815 +BT
  816 + /F1 24 Tf
  817 + 72 720 Td
  818 + (Potato 6) Tj
  819 +ET
  820 +endstream
  821 +endobj
  822 +
  823 +48 0 obj
  824 +46
  825 +endobj
  826 +
  827 +%% Contents for page 8
  828 +49 0 obj
  829 +<<
  830 + /Length 50 0 R
  831 +>>
  832 +stream
  833 +BT
  834 + /F1 24 Tf
  835 + 72 720 Td
  836 + (Potato 7) Tj
  837 +ET
  838 +endstream
  839 +endobj
  840 +
  841 +50 0 obj
  842 +46
  843 +endobj
  844 +
  845 +%% Contents for page 9
  846 +51 0 obj
  847 +<<
  848 + /Length 52 0 R
  849 +>>
  850 +stream
  851 +BT
  852 + /F1 24 Tf
  853 + 72 720 Td
  854 + (Potato 8) Tj
  855 +ET
  856 +endstream
  857 +endobj
  858 +
  859 +52 0 obj
  860 +46
  861 +endobj
  862 +
  863 +%% Contents for page 10
  864 +53 0 obj
  865 +<<
  866 + /Length 54 0 R
  867 +>>
  868 +stream
  869 +BT
  870 + /F1 24 Tf
  871 + 72 720 Td
  872 + (Potato 9) Tj
  873 +ET
  874 +endstream
  875 +endobj
  876 +
  877 +54 0 obj
  878 +46
  879 +endobj
  880 +
  881 +%% Contents for page 11
  882 +55 0 obj
  883 +<<
  884 + /Length 56 0 R
  885 +>>
  886 +stream
  887 +BT
  888 + /F1 24 Tf
  889 + 72 720 Td
  890 + (Potato 10) Tj
  891 +ET
  892 +endstream
  893 +endobj
  894 +
  895 +56 0 obj
  896 +47
  897 +endobj
  898 +
  899 +%% Contents for page 12
  900 +57 0 obj
  901 +<<
  902 + /Length 58 0 R
  903 +>>
  904 +stream
  905 +BT
  906 + /F1 24 Tf
  907 + 72 720 Td
  908 + (Potato 11) Tj
  909 +ET
  910 +endstream
  911 +endobj
  912 +
  913 +58 0 obj
  914 +47
  915 +endobj
  916 +
  917 +%% Contents for page 13
  918 +59 0 obj
  919 +<<
  920 + /Length 60 0 R
  921 +>>
  922 +stream
  923 +BT
  924 + /F1 24 Tf
  925 + 72 720 Td
  926 + (Potato 12) Tj
  927 +ET
  928 +endstream
  929 +endobj
  930 +
  931 +60 0 obj
  932 +47
  933 +endobj
  934 +
  935 +%% Contents for page 14
  936 +61 0 obj
  937 +<<
  938 + /Length 62 0 R
  939 +>>
  940 +stream
  941 +BT
  942 + /F1 24 Tf
  943 + 72 720 Td
  944 + (Potato 13) Tj
  945 +ET
  946 +endstream
  947 +endobj
  948 +
  949 +62 0 obj
  950 +47
  951 +endobj
  952 +
  953 +%% Contents for page 15
  954 +63 0 obj
  955 +<<
  956 + /Length 64 0 R
  957 +>>
  958 +stream
  959 +BT
  960 + /F1 24 Tf
  961 + 72 720 Td
  962 + (Potato 14) Tj
  963 +ET
  964 +endstream
  965 +endobj
  966 +
  967 +64 0 obj
  968 +47
  969 +endobj
  970 +
  971 +%% Contents for page 16
  972 +65 0 obj
  973 +<<
  974 + /Length 66 0 R
  975 +>>
  976 +stream
  977 +BT
  978 + /F1 24 Tf
  979 + 72 720 Td
  980 + (Potato 15) Tj
  981 +ET
  982 +endstream
  983 +endobj
  984 +
  985 +66 0 obj
  986 +47
  987 +endobj
  988 +
  989 +%% Contents for page 17
  990 +67 0 obj
  991 +<<
  992 + /Length 68 0 R
  993 +>>
  994 +stream
  995 +BT
  996 + /F1 24 Tf
  997 + 72 720 Td
  998 + (Potato 16) Tj
  999 +ET
  1000 +endstream
  1001 +endobj
  1002 +
  1003 +68 0 obj
  1004 +47
  1005 +endobj
  1006 +
  1007 +%% Contents for page 18
  1008 +69 0 obj
  1009 +<<
  1010 + /Length 70 0 R
  1011 +>>
  1012 +stream
  1013 +BT
  1014 + /F1 24 Tf
  1015 + 72 720 Td
  1016 + (Potato 17) Tj
  1017 +ET
  1018 +endstream
  1019 +endobj
  1020 +
  1021 +70 0 obj
  1022 +47
  1023 +endobj
  1024 +
  1025 +%% Contents for page 19
  1026 +71 0 obj
  1027 +<<
  1028 + /Length 72 0 R
  1029 +>>
  1030 +stream
  1031 +BT
  1032 + /F1 24 Tf
  1033 + 72 720 Td
  1034 + (Potato 18) Tj
  1035 +ET
  1036 +endstream
  1037 +endobj
  1038 +
  1039 +72 0 obj
  1040 +47
  1041 +endobj
  1042 +
  1043 +%% Contents for page 20
  1044 +73 0 obj
  1045 +<<
  1046 + /Length 74 0 R
  1047 +>>
  1048 +stream
  1049 +BT
  1050 + /F1 24 Tf
  1051 + 72 720 Td
  1052 + (Potato 19) Tj
  1053 +ET
  1054 +endstream
  1055 +endobj
  1056 +
  1057 +74 0 obj
  1058 +47
  1059 +endobj
  1060 +
  1061 +%% Contents for page 21
  1062 +75 0 obj
  1063 +<<
  1064 + /Length 76 0 R
  1065 +>>
  1066 +stream
  1067 +BT
  1068 + /F1 24 Tf
  1069 + 72 720 Td
  1070 + (Potato 20) Tj
  1071 +ET
  1072 +endstream
  1073 +endobj
  1074 +
  1075 +76 0 obj
  1076 +47
  1077 +endobj
  1078 +
  1079 +%% Contents for page 22
  1080 +77 0 obj
  1081 +<<
  1082 + /Length 78 0 R
  1083 +>>
  1084 +stream
  1085 +BT
  1086 + /F1 24 Tf
  1087 + 72 720 Td
  1088 + (Potato 21) Tj
  1089 +ET
  1090 +endstream
  1091 +endobj
  1092 +
  1093 +78 0 obj
  1094 +47
  1095 +endobj
  1096 +
  1097 +%% Contents for page 23
  1098 +79 0 obj
  1099 +<<
  1100 + /Length 80 0 R
  1101 +>>
  1102 +stream
  1103 +BT
  1104 + /F1 24 Tf
  1105 + 72 720 Td
  1106 + (Potato 22) Tj
  1107 +ET
  1108 +endstream
  1109 +endobj
  1110 +
  1111 +80 0 obj
  1112 +47
  1113 +endobj
  1114 +
  1115 +%% Contents for page 24
  1116 +81 0 obj
  1117 +<<
  1118 + /Length 82 0 R
  1119 +>>
  1120 +stream
  1121 +BT
  1122 + /F1 24 Tf
  1123 + 72 720 Td
  1124 + (Potato 23) Tj
  1125 +ET
  1126 +endstream
  1127 +endobj
  1128 +
  1129 +82 0 obj
  1130 +47
  1131 +endobj
  1132 +
  1133 +%% Contents for page 25
  1134 +83 0 obj
  1135 +<<
  1136 + /Length 84 0 R
  1137 +>>
  1138 +stream
  1139 +BT
  1140 + /F1 24 Tf
  1141 + 72 720 Td
  1142 + (Potato 24) Tj
  1143 +ET
  1144 +endstream
  1145 +endobj
  1146 +
  1147 +84 0 obj
  1148 +47
  1149 +endobj
  1150 +
  1151 +%% Contents for page 26
  1152 +85 0 obj
  1153 +<<
  1154 + /Length 86 0 R
  1155 +>>
  1156 +stream
  1157 +BT
  1158 + /F1 24 Tf
  1159 + 72 720 Td
  1160 + (Potato 25) Tj
  1161 +ET
  1162 +endstream
  1163 +endobj
  1164 +
  1165 +86 0 obj
  1166 +47
  1167 +endobj
  1168 +
  1169 +%% Contents for page 27
  1170 +87 0 obj
  1171 +<<
  1172 + /Length 88 0 R
  1173 +>>
  1174 +stream
  1175 +BT
  1176 + /F1 24 Tf
  1177 + 72 720 Td
  1178 + (Potato 26) Tj
  1179 +ET
  1180 +endstream
  1181 +endobj
  1182 +
  1183 +88 0 obj
  1184 +47
  1185 +endobj
  1186 +
  1187 +%% Contents for page 28
  1188 +89 0 obj
  1189 +<<
  1190 + /Length 90 0 R
  1191 +>>
  1192 +stream
  1193 +BT
  1194 + /F1 24 Tf
  1195 + 72 720 Td
  1196 + (Potato 27) Tj
  1197 +ET
  1198 +endstream
  1199 +endobj
  1200 +
  1201 +90 0 obj
  1202 +47
  1203 +endobj
  1204 +
  1205 +%% Contents for page 29
  1206 +91 0 obj
  1207 +<<
  1208 + /Length 92 0 R
  1209 +>>
  1210 +stream
  1211 +BT
  1212 + /F1 24 Tf
  1213 + 72 720 Td
  1214 + (Potato 28) Tj
  1215 +ET
  1216 +endstream
  1217 +endobj
  1218 +
  1219 +92 0 obj
  1220 +47
  1221 +endobj
  1222 +
  1223 +%% Contents for page 30
  1224 +93 0 obj
  1225 +<<
  1226 + /Length 94 0 R
  1227 +>>
  1228 +stream
  1229 +BT
  1230 + /F1 24 Tf
  1231 + 72 720 Td
  1232 + (Potato 29) Tj
  1233 +ET
  1234 +endstream
  1235 +endobj
  1236 +
  1237 +94 0 obj
  1238 +47
  1239 +endobj
  1240 +
  1241 +95 0 obj
  1242 +<<
  1243 + /Type /Outlines
  1244 + /First 96 0 R
  1245 + /Last 97 0 R
  1246 + /Count 6
  1247 +>>
  1248 +endobj
  1249 +
  1250 +96 0 obj
  1251 +<<
  1252 + /Type /Outline
  1253 + /Title (Isís 1 -> 5: /XYZ null null null)
  1254 + /Parent 95 0 R
  1255 + /Count 4
  1256 + /Next 97 0 R
  1257 + /First 98 0 R
  1258 + /Last 99 0 R
  1259 + /Dest [ 8 0 R /XYZ null null null ]
  1260 +>>
  1261 +endobj
  1262 +
  1263 +97 0 obj
  1264 +<<
  1265 + /Type /Outline
  1266 + /Title (Trepak 2 -> 15: /XYZ 66 756 3)
  1267 + /Parent 95 0 R
  1268 + /Prev 96 0 R
  1269 + /Dest [ 18 0 R /XYZ 66 756 3 ]
  1270 +>>
  1271 +endobj
  1272 +
  1273 +98 0 obj
  1274 +<<
  1275 + /Type /Outline
  1276 + /Title (Amanda 1.1 -> 11: /Fit)
  1277 + /Parent 96 0 R
  1278 + /Next 99 0 R
  1279 + /First 100 0 R
  1280 + /Last 101 0 R
  1281 + /Count -3
  1282 + /Dest [ 14 0 R /Fit ]
  1283 +>>
  1284 +endobj
  1285 +
  1286 +99 0 obj
  1287 +<<
  1288 + /Type /Outline
  1289 + % /Title (Sandy (Sandy [Greek]) 1.2 -> 13: /FitH 792)
  1290 + /Title <feff00530061006e00640079002000f703a303b103bd03b403b900f700200031002e00320020002d003e002000310033003a0020002f00460069007400480020003700390032>
  1291 + /Parent 96 0 R
  1292 + /Prev 98 0 R
  1293 + /First 105 0 R
  1294 + /Last 106 0 R
  1295 + /Count 2
  1296 + /Dest [ 16 0 R /FitH 792 ]
  1297 +>>
  1298 +endobj
  1299 +
  1300 +100 0 obj
  1301 +<<
  1302 + /Type /Outline
  1303 + /Title (Isosicle 1.1.1 -> 12: /FitV 100)
  1304 + /Parent 98 0 R
  1305 + /Next 101 0 R
  1306 + /First 102 0 R
  1307 + /Last 103 0 R
  1308 + /Count -2
  1309 + /Dest [ 15 0 R /FitV 100 ]
  1310 +>>
  1311 +endobj
  1312 +
  1313 +101 0 obj
  1314 +<<
  1315 + /Type /Outline
  1316 + /Title (Isosicle 1.1.2 -> 12: /XYZ null null null)
  1317 + /Parent 98 0 R
  1318 + /Prev 100 0 R
  1319 + /First 104 0 R
  1320 + /Last 104 0 R
  1321 + /Count 1
  1322 + /Dest [ 15 0 R /XYZ null null null ]
  1323 +>>
  1324 +endobj
  1325 +
  1326 +102 0 obj
  1327 +<<
  1328 + /Type /Outline
  1329 + /Title (Isosicle 1.1.1.1 -> 18: /XYZ null null null)
  1330 + /Parent 100 0 R
  1331 + /Next 103 0 R
  1332 + /Dest [ 21 0 R /XYZ null null null ]
  1333 +>>
  1334 +endobj
  1335 +
  1336 +103 0 obj
  1337 +<<
  1338 + /Type /Outline
  1339 + /Title (Isosicle 1.1.1.2 -> 19: /XYZ null null null)
  1340 + /Parent 100 0 R
  1341 + /Prev 102 0 R
  1342 + /Dest [ 22 0 R /XYZ null null null ]
  1343 +>>
  1344 +endobj
  1345 +
  1346 +104 0 obj
  1347 +<<
  1348 + /Type /Outline
  1349 + /Title (Isosicle 1.1.2.1 -> 22: /XYZ null null null)
  1350 + /Parent 101 0 R
  1351 + /Dest [ 25 0 R /XYZ null null null ]
  1352 +>>
  1353 +endobj
  1354 +
  1355 +105 0 obj
  1356 +<<
  1357 + /Type /Outline
  1358 + /Title (Trepsichord 1.2.1 -> 1: /FitR 66 714 180 770)
  1359 + /Parent 99 0 R
  1360 + /Next 106 0 R
  1361 + /Dest [ 4 0 R /FitR 66 714 180 770 ]
  1362 +>>
  1363 +endobj
  1364 +
  1365 +106 0 obj
  1366 +<<
  1367 + /Type /Outline
  1368 + /Title (Trepsicle 1.2.2 -> 0: /XYZ null null null)
  1369 + /Parent 99 0 R
  1370 + /Prev 105 0 R
  1371 + /Dest [ 3 0 R /XYZ null null null ]
  1372 +>>
  1373 +endobj
  1374 +
  1375 +107 0 obj
  1376 + << /Nums [
  1377 + 0 << /P () >>
  1378 + 2 << /S /r /St 1 >>
  1379 + 7 << /P () >>
  1380 + 9 << /S /r /St 6 >>
  1381 + 11 << /P () >>
  1382 + 12 << /S /D /St 2 >>
  1383 + 15 << /S /D /St 6 >>
  1384 + 19 << /P () >>
  1385 + 20 << /S /D /St 12 >>
  1386 + 22 << /S /D /St 16059 >>
  1387 + 23 << /S /r /St 50 >>
  1388 + 29 << /S /r /St 54 >>
  1389 + ] >>
  1390 +endobj
  1391 +
  1392 +xref
  1393 +0 108
  1394 +0000000000 65535 f
  1395 +0000000025 00000 n
  1396 +0000000145 00000 n
  1397 +0000000541 00000 n
  1398 +0000000746 00000 n
  1399 +0000000951 00000 n
  1400 +0000001156 00000 n
  1401 +0000001361 00000 n
  1402 +0000001566 00000 n
  1403 +0000001771 00000 n
  1404 +0000001976 00000 n
  1405 +0000002182 00000 n
  1406 +0000002389 00000 n
  1407 +0000002596 00000 n
  1408 +0000002803 00000 n
  1409 +0000003010 00000 n
  1410 +0000003217 00000 n
  1411 +0000003424 00000 n
  1412 +0000003631 00000 n
  1413 +0000003838 00000 n
  1414 +0000004045 00000 n
  1415 +0000004252 00000 n
  1416 +0000004459 00000 n
  1417 +0000004666 00000 n
  1418 +0000004873 00000 n
  1419 +0000005080 00000 n
  1420 +0000005287 00000 n
  1421 +0000005494 00000 n
  1422 +0000005701 00000 n
  1423 +0000005908 00000 n
  1424 +0000006115 00000 n
  1425 +0000006322 00000 n
  1426 +0000006529 00000 n
  1427 +0000006748 00000 n
  1428 +0000006851 00000 n
  1429 +0000006871 00000 n
  1430 +0000006990 00000 n
  1431 +0000007049 00000 n
  1432 +0000007152 00000 n
  1433 +0000007195 00000 n
  1434 +0000007298 00000 n
  1435 +0000007341 00000 n
  1436 +0000007444 00000 n
  1437 +0000007487 00000 n
  1438 +0000007590 00000 n
  1439 +0000007633 00000 n
  1440 +0000007736 00000 n
  1441 +0000007779 00000 n
  1442 +0000007882 00000 n
  1443 +0000007925 00000 n
  1444 +0000008028 00000 n
  1445 +0000008071 00000 n
  1446 +0000008174 00000 n
  1447 +0000008218 00000 n
  1448 +0000008321 00000 n
  1449 +0000008365 00000 n
  1450 +0000008469 00000 n
  1451 +0000008513 00000 n
  1452 +0000008617 00000 n
  1453 +0000008661 00000 n
  1454 +0000008765 00000 n
  1455 +0000008809 00000 n
  1456 +0000008913 00000 n
  1457 +0000008957 00000 n
  1458 +0000009061 00000 n
  1459 +0000009105 00000 n
  1460 +0000009209 00000 n
  1461 +0000009253 00000 n
  1462 +0000009357 00000 n
  1463 +0000009401 00000 n
  1464 +0000009505 00000 n
  1465 +0000009549 00000 n
  1466 +0000009653 00000 n
  1467 +0000009697 00000 n
  1468 +0000009801 00000 n
  1469 +0000009845 00000 n
  1470 +0000009949 00000 n
  1471 +0000009993 00000 n
  1472 +0000010097 00000 n
  1473 +0000010141 00000 n
  1474 +0000010245 00000 n
  1475 +0000010289 00000 n
  1476 +0000010393 00000 n
  1477 +0000010437 00000 n
  1478 +0000010541 00000 n
  1479 +0000010585 00000 n
  1480 +0000010689 00000 n
  1481 +0000010733 00000 n
  1482 +0000010837 00000 n
  1483 +0000010881 00000 n
  1484 +0000010985 00000 n
  1485 +0000011029 00000 n
  1486 +0000011133 00000 n
  1487 +0000011177 00000 n
  1488 +0000011281 00000 n
  1489 +0000011301 00000 n
  1490 +0000011388 00000 n
  1491 +0000011584 00000 n
  1492 +0000011730 00000 n
  1493 +0000011905 00000 n
  1494 +0000012258 00000 n
  1495 +0000012449 00000 n
  1496 +0000012659 00000 n
  1497 +0000012828 00000 n
  1498 +0000012997 00000 n
  1499 +0000013150 00000 n
  1500 +0000013319 00000 n
  1501 +0000013484 00000 n
  1502 +trailer <<
  1503 + /Root 1 0 R
  1504 + /Size 108
  1505 +>>
  1506 +startxref
  1507 +13801
  1508 +%%EOF
  1509 +
  1510 +% 1. Delete page labels
  1511 +xref
  1512 +0 1
  1513 +0000000107 65535 f
  1514 +107 1
  1515 +0000000000 00001 f
  1516 +trailer << /Root 1 0 R /Size 108 /Prev 13801 >>
  1517 +startxref
  1518 +16059
  1519 +%%EOF
  1520 +
  1521 +% 2. Delete outlines, reuse page labels.
  1522 +
  1523 +107 1 obj
  1524 + << /Nums [
  1525 + 0 << /P () >>
  1526 + 2 << /S /D /St 1 >>
  1527 + 7 << /P () >>
  1528 + 9 << /S /R /St 6 >>
  1529 + 11 << /P () >>
  1530 + 12 << /S /r /St 2 >>
  1531 + 15 << /S /r /St 6 >>
  1532 + 19 << /P () >>
  1533 + 20 << /S /R /St 12 >>
  1534 + 22 << /S /D /St 16059 >>
  1535 + 23 << /S /r /St 50 >>
  1536 + 29 << /S /r /St 54 >>
  1537 + ] >>
  1538 +endobj
  1539 +
  1540 +% Reuse object 1 with the same generation number. Leave outlines
  1541 +% there pointing to a deleted object.
  1542 +1 0 obj
  1543 +<<
  1544 + /PageLabels 107 1 R
  1545 + /Pages 2 0 R
  1546 + /Type /Catalog
  1547 + /PageMode /UseOutlines
  1548 + /Outlines 95 0 R
  1549 +>>
  1550 +endobj
  1551 +
  1552 +% Reuse object 33 to replace contents for page 1
  1553 +33 0 obj
  1554 +<<
  1555 + /Length 50
  1556 +>>
  1557 +stream
  1558 +BT
  1559 + /F1 24 Tf
  1560 + 72 720 Td
  1561 + (Potato 0 new) Tj
  1562 +ET
  1563 +endstream
  1564 +endobj
  1565 +
  1566 +% Delete object 34
  1567 +
  1568 +xref
  1569 +0 2
  1570 +0000000034 65535 f
  1571 +0000016648 00000 n
  1572 +33 2
  1573 +0000016817 00000 n
  1574 +0000000095 00001 f
  1575 +95 13
  1576 +0000000096 00001 f
  1577 +0000000097 00001 f
  1578 +0000000098 00001 f
  1579 +0000000099 00001 f
  1580 +0000000100 00001 f
  1581 +0000000101 00001 f
  1582 +0000000102 00001 f
  1583 +0000000103 00001 f
  1584 +0000000104 00001 f
  1585 +0000000105 00001 f
  1586 +0000000106 00001 f
  1587 +0000000000 00001 f
  1588 +0000016227 00001 n
  1589 +trailer << /Size 108 /Prev 16940 /Root 1 0 R >>
  1590 +startxref
  1591 +16940
  1592 +%%EOF
qpdf/qtest/qpdf/issue-149.out
1 -WARNING: issue-149.pdf: reported number of objects (11) inconsistent with actual number of objects (7) 1 +WARNING: issue-149.pdf: file is damaged
  2 +WARNING: issue-149.pdf: loop detected following xref tables
  3 +WARNING: issue-149.pdf: Attempting to reconstruct cross-reference table
2 qpdf: operation succeeded with warnings; resulting file may have some problems 4 qpdf: operation succeeded with warnings; resulting file may have some problems