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

Invalid .pfb font file hangs JVM

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 5.0
    • 1.3.1
    • client-libs
    • 2d
    • tiger
    • sparc
    • solaris_8


      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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: