Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-1583

wasted work in PDDocument.addSignature(...)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.1
    • 1.8.2
    • None

    Description

      The problem appears in version 1.8.1 and in revision 1476791. I
      attached a one-line patch that fixes it. This problem is similar to
      the already fixed PDFBOX-1447 and PDFBOX-1457.

      In method "PDDocument.addSignature", the loop over "cosObjects" should
      break immediately after "annotNotFound" and "sigFieldNotFound" are set
      to "false". All the iterations after "annotNotFound" and
      "sigFieldNotFound" are set to "false" do not perform any useful work
      because the two "if" statements performing useful work depend on
      "annotNotFound" and "sigFieldNotFound".

      Attachments

        1. patch.diff
          0.6 kB
          Adrian Nistor

        Activity

          People

            lehmi Andreas Lehmkühler
            adriannistor Adrian Nistor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: