diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-30 10:35:12 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-30 10:35:12 +0700 |
commit | 659eafd2dffa3c1ab2a15b60bac583635b3769cc (patch) | |
tree | 19d292864ae4697e1e23fd58897af3a0252b861d /crypto/src/asn1/Asn1InputStream.cs | |
parent | Some PORTABLE cleanup (diff) | |
download | BouncyCastle.NET-ed25519-659eafd2dffa3c1ab2a15b60bac583635b3769cc.tar.xz |
Null tmpBuffers when disposing
Diffstat (limited to 'crypto/src/asn1/Asn1InputStream.cs')
-rw-r--r-- | crypto/src/asn1/Asn1InputStream.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crypto/src/asn1/Asn1InputStream.cs b/crypto/src/asn1/Asn1InputStream.cs index 1df6a0206..da6175fcc 100644 --- a/crypto/src/asn1/Asn1InputStream.cs +++ b/crypto/src/asn1/Asn1InputStream.cs @@ -17,7 +17,7 @@ namespace Org.BouncyCastle.Asn1 { private readonly int limit; - internal readonly byte[][] tmpBuffers; + internal byte[][] tmpBuffers; internal static int FindLimit(Stream input) { @@ -67,6 +67,13 @@ namespace Org.BouncyCastle.Asn1 this.tmpBuffers = tmpBuffers; } + protected override void Dispose(bool disposing) + { + tmpBuffers = null; + + base.Dispose(disposing); + } + /** * build an object given its tag and the number of bytes to construct it from. */ |