summary refs log tree commit diff
path: root/crypto/src/asn1/DerEnumerated.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2013-11-01 20:15:24 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2013-11-01 20:15:24 +0700
commit67cff6633ef87309ba7d8144d0fa0320abd22c46 (patch)
tree073b66b39d097121248f193a124b8370c87390fc /crypto/src/asn1/DerEnumerated.cs
parentAdd EnumeratedTest class (diff)
downloadBouncyCastle.NET-ed25519-67cff6633ef87309ba7d8144d0fa0320abd22c46.tar.xz
Clone bytes in constructor since it may be using a temp buffer in the ASN.1 parser
Diffstat (limited to 'crypto/src/asn1/DerEnumerated.cs')
-rw-r--r--crypto/src/asn1/DerEnumerated.cs2
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