diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-11-01 20:15:24 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-11-01 20:15:24 +0700 |
commit | 67cff6633ef87309ba7d8144d0fa0320abd22c46 (patch) | |
tree | 073b66b39d097121248f193a124b8370c87390fc | |
parent | Add EnumeratedTest class (diff) | |
download | BouncyCastle.NET-ed25519-67cff6633ef87309ba7d8144d0fa0320abd22c46.tar.xz |
Clone bytes in constructor since it may be using a temp buffer in the ASN.1 parser
-rw-r--r-- | crypto/src/asn1/DerEnumerated.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/asn1/DerEnumerated.cs b/crypto/src/asn1/DerEnumerated.cs index 0e67e6dbe..a62afb301 100644 --- a/crypto/src/asn1/DerEnumerated.cs +++ b/crypto/src/asn1/DerEnumerated.cs @@ -64,7 +64,7 @@ namespace Org.BouncyCastle.Asn1 public DerEnumerated( byte[] bytes) { - this.bytes = bytes; + this.bytes = Arrays.Clone(bytes); } public BigInteger Value |