BufferedReader.readLine(int maxlen) to limit maximum number of read characters

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P5
    • None
    • Affects Version/s: 1.1.5
    • Component/s: core-libs
    • generic
    • generic

      Name: tb29552 Date: 01/29/98


      Requested by:
      (company - Mobile Telephone Networks , email - ###@###.###)

      This would allow a programmer to read a line of text
      not more than a certain number of characters.

      Eg. reading a socket that does text IO (like SMTP)
      one wants to read a line but not more than a certain
      number of characters.

      To use readLine() as is would be convinient but opens
      such a socket reader to denial of service attacks
      when a client spams volumes of text to the socket
      with no new line characters. The BufferedReader
      will read all of the text and eventually run out
      of memory.

      (Review ID: 24018)
      ======================================================================

            Assignee:
            Iris Clark
            Reporter:
            Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: