Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4807886

Invalid .pfb font file hangs JVM

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 5.0
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • Resolved In Build:
      tiger
    • CPU:
      sparc
    • OS:
      solaris_8

      Description


      If the JVM tries to load a .pfb file that is not a valid font file it may fall into a infinite loop.

      To reproduce the problem, copy the attached file IndexBase.pfb to <jre>/lib/fonts. Then compile and run the attached class BadFontBug. The JVM will go into an infinte loop in native code while trying to parse the invalid .pfb file.

      This case is a simplification of the case encountered by the ISV. In the real application, the .pfb file is part of the files installed by the application (it is a device configuration file for a 3D input device). The application is installed using pkgadd, which leads to the .pfb file being listed in /var/sadm/install/contents. The JVM searches /var/sadm/install/contents looking for fonts, finds the .pfb file and tries to parse it to determine the font's characteristics. Since the file isn't a valid font file, the parser gets confused, leading to an infinite loop.

      The problem repored by the user happens only under Solaris, with Java 1.3 and Java 1.4

        Attachments

          Activity

            People

            • Assignee:
              igor Igor Nekrestyanov (Inactive)
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: