8275151: Improved Object Identification

Reviewed-by: rhalade, jnimeh
This commit is contained in:
Anthony Scarpino 2021-11-03 17:52:41 +00:00 committed by Henry Jen
parent 0592e71b72
commit 11faf5395f

@ -684,6 +684,10 @@ public final class ObjectIdentifier implements Serializable {
}
private static void checkOidSize(int oidLength) throws IOException {
if (oidLength < 0) {
throw new IOException("ObjectIdentifier encoded length was " +
"negative: " + oidLength);
}
if (oidLength > MAXIMUM_OID_SIZE) {
throw new IOException(
"ObjectIdentifier encoded length exceeds " +