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

race condition in PdfFont

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.7.3
    • 0.8.0-incubator
    • None
    • None

    Description

      this code in PDFFont.encode isn't thread safe,

      COSName encodingName = (COSName)encoding;
      cmap = (CMap)cmapObjects.get( encodingName );
      if( cmap != null )

      { cmap = (CMap)cmapObjects.get( encodingName ); }

      cmap may be cleared in PDFont.clearResources(), and it may be cleared in the interval between the two get() calls. The first get() may be non null, while the second may be null. The second get may be removed altogether.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sgbridges Sean Bridges
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: