Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,11 @@ public byte peek(int offset) {
* of the underlying byte sequence.
*/
public void skip(final int length) {
position(pos + length);
final long newPos = (long) pos + length;
if (newPos < 0 || newPos > sequence.length()) {
throw new IndexOutOfBoundsException();
}
position((int) newPos);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions Copyright [year] [name of copyright owner]".
*
* Copyright 2012-2016 ForgeRock AS.
* Portions Copyrighted 2026 3A Systems, LLC.
*/
package org.forgerock.opendj.ldap;

Expand Down Expand Up @@ -653,7 +654,13 @@
throw new LocalizedIllegalArgumentException(message);
}

final Double fractionValue = Double.parseDouble(fractionBuffer.toString());
final double fractionValue = Double.parseDouble(fractionBuffer.toString());

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
if (!(fractionValue >= 0.0d && fractionValue < 1.0d)) {
// Cannot happen: the buffer contains "0." followed by decimal digits.
final LocalizableMessage message =
WARN_ATTR_SYNTAX_GENERALIZED_TIME_ILLEGAL_TIME.get(value, fractionBuffer);
throw new LocalizedIllegalArgumentException(message);
}
final int additionalMilliseconds = (int) Math.round(fractionValue * multiplier);

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*
* Copyright 2006-2009 Sun Microsystems, Inc.
* Portions Copyright 2013-2015 ForgeRock AS.
* Portions Copyrighted 2026 3A Systems, LLC.
*/
package org.opends.server.replication.common;

Expand Down Expand Up @@ -319,11 +320,11 @@ else if (csn1.timeStamp != csn2.timeStamp)
}
else if (csn1.seqnum != csn2.seqnum)
{
return csn1.seqnum - csn2.seqnum;
return Integer.compare(csn1.seqnum, csn2.seqnum);
}
else
{
return csn1.serverId - csn2.serverId;
return Integer.compare(csn1.serverId, csn2.serverId);
}
}

Expand Down
Loading