From 67cff6633ef87309ba7d8144d0fa0320abd22c46 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Fri, 1 Nov 2013 20:15:24 +0700 Subject: Clone bytes in constructor since it may be using a temp buffer in the ASN.1 parser --- crypto/src/asn1/DerEnumerated.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit 1.4.1