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

fp.bugs 5101 "break" line is missed in java.io.DataInputStream.readUTF()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 1.1
    • 1.0.2
    • core-libs
    • 1.1
    • sparc
    • solaris_2.5
    • Not verified

    Description

      Article 5101 (1219 more) in fp.bugs (moderated):
      From: ###@###.### (0000-Admin(0000))

      Subject: Unknown bug report
      Date: 21 Jul 1996 06:34:07 -0700
      Organization: Sun Microsystems Inc., Mountain View, CA
      Lines: 28
      Distribution: local
      NNTP-Posting-Host: engnews3.eng.sun.com
      To: ###@###.###

      From: ###@###.###
      This does not look like form output to me.


      A "break" line is missed in readUTF() (java.io.DataInputStream class).
      UTFDataFormatException will occured without fixing this bug.

      case 14:
      // 1110 xxxx 10xx xxxx 10xx xxxx
      count += 3;
      if (count > utflen)
      throw new UTFDataFormatException();
      char2 = in.readUnsignedByte();
      char3 = in.readUnsignedByte();
      if (((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80))
      throw new UTFDataFormatException();
      str[strlen++] = (char)(((c & 0x0F) << 12) |
      ((char2 & 0x3F) << 6) |
      ((char3 & 0x3F) << 0));
      // <- here!!!
      default:
      // 10xx xxxx, 1111 xxxx
      throw new UTFDataFormatException();
      }
      }

      Kazuhiro Kazama (###@###.###)

      Attachments

        Activity

          People

            busersunw Btplusnull User (Inactive)
            bhagen Benjamin Hagen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: