Skip to content

Commit

Permalink
TKSS-835: Backport JDK-8336667: IAE in DerInputStream.toByteArray
Browse files Browse the repository at this point in the history
  • Loading branch information
johnshajiang committed Jul 31, 2024
1 parent fb86ebe commit b206ad6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -114,7 +114,7 @@ public DerValue getDerValue() throws IOException {
// to the end of return value by DerIndefLenConverter::convertBytes
// and stay inside result.buffer.
int unused = result.buffer.length - result.end;
this.pos = this.data.length - unused;
this.pos = this.end - unused;
} else {
this.pos = result.end;
}
Expand Down

0 comments on commit b206ad6

Please sign in to comment.