mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

coulbeck
11.30.2006 62b5bb664127c04d051d90d001a07e8fd6f9adb9
opends/src/server/org/opends/server/protocols/asn1/ASN1Element.java
@@ -969,7 +969,7 @@
          throw new ASN1Exception(msgID, message);
        }
        if ((startPos + numLengthBytes) > encodedElements.length)
        if (numLengthBytes > encodedElements.length - startPos)
        {
          int    msgID   = MSGID_ASN1_ELEMENT_SET_TRUNCATED_LENGTH;
          String message = getMessage(msgID, numLengthBytes);
@@ -985,11 +985,11 @@
      // Make sure that there are at least enough bytes to hold the value.
      if ((startPos + length) > encodedElements.length)
      if (length > encodedElements.length - startPos)
      {
        int    msgID   = MSGID_ASN1_ELEMENT_SET_TRUNCATED_VALUE;
        String message = getMessage(msgID, length,
                                    (startPos+length-encodedElements.length));
                                    (encodedElements.length-startPos));
        throw new ASN1Exception(msgID, message);
      }