Arrays::getLength: include 'from' in exception message - #1
Open
Artox wants to merge 2 commits into
Open
Conversation
Use append to add 'from' value to the ByteBuffer. This avoids accidentally interpreting it as initial buffer capacity in the constructor. Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
Throw IllegalArgumentException if from > to (newLength < 0). Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
Author
|
careful about the second commit, it would be better off in its own pr. I don't know how much error handling you want to include in Arrays class. The check I added here could go into all copyOfRange methods! |
Member
|
@Artox Are you sure that you wanted to do this PR against our bouncy castle fork? The main repo is here: https://github.com/bcgit/bc-java |
Member
|
I just saw your comment here: open-keychain/open-keychain#1936 (comment) Is this PR related? Please explain what you are trying to fix. |
ShellWen
pushed a commit
to ShellWen/bouncycastle
that referenced
this pull request
Jun 29, 2022
Added new constructor to ASN1EncodableVector that takes array of ASN1Encodables. Updated ExtensionGenerator to match C# equivalent. Added method to extract extensions from PKCS10CertificationRequest Added tests
ShellWen
pushed a commit
to ShellWen/bouncycastle
that referenced
this pull request
Jun 29, 2022
moved [] constructor to addAll method in ASN1EncodableVector
ShellWen
pushed a commit
to ShellWen/bouncycastle
that referenced
this pull request
Jun 29, 2022
PGP{Public|Secret}KeyRingCollection: Ignore marker packets when reading.
open-keychain#1
Merged PR from GitHub, updated contributors, fixed formatting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explicitly pass 'from' as String to the constructor of ByteBuffer
to avoid interpreting it as initial buffer capacity.