Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-102

Potential unread bytes in readSwappedLong(InputStream)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.3
    • Utilities
    • None

    Description

      In:

      byte[] bytes = new byte[8];
      input.read( bytes );
      return readSwappedLong( bytes, 0 );

      There is no check on the int return value from input.read, so it's possible that 8 bytes won't be read.

      Attachments

        1. IO-102.patch
          0.5 kB
          Henri Yandell

        Activity

          People

            Unassigned Unassigned
            bayard Henri Yandell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: