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

engineUpdate: unspecified behavior when parameters are illegal

XMLWordPrintable


      The spec. doesn't define behavior for the method
      MessageDigestSpi.engineUpdate(byte[] input, int offset, int len)
      when one of its parameters is illegal.

      The spec says:
        "protected abstract void engineUpdate(byte[] input, int offset, int len)

         Updates the digest using the specified array of bytes, starting at
         the specified offset.

         Parameters:
             input - the array of bytes to use for the update.
             offset - the offset to start from in the array of bytes.
             len - the number of bytes to use, starting at offset."

      So, the spec. should define the method behavior when:
      1) 'input' array is null
      2) 'offset' is outside 'input' array bounds.
      3) 'len' is less then zero or
         'offset' + 'len' is outside 'input' array bounds.

      ###@###.### 2004-02-26

            valeriep Valerie Peng
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: