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

Possible memory leak after calling decode filter

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.23
    • Fix Version/s: 2.0.24, 3.0.0 PDFBox
    • Component/s: None
    • Labels:
      None

      Description

      valerybokov noticed in PR#107 that filters are sometimes closed and sometimes not

      IdentityFilter and CCITTFaxFilter extends Filter
      IdentityFilter.encode(InputStream, OutputStream, COSDictionary). The InputStream will not be closed.
      CCITTFaxFilter.encode(InputStream, OutputStream, COSDictionary). The InputStream will be closed.
      The input parameter will not be closed if an exception is thrown.

      My understanding is that the caller should close streams unless the javadoc tell something else. So I did search a bit, and found places in COSStream and PDStream where this isn't done. Any close in filter should be removed.

      I also searched for encode but there I found that the caller closes properly.

        Attachments

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              tilman Tilman Hausherr

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment