summary refs log tree commit diff
path: root/crypto/src/asn1/DerObjectIdentifier.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/DerObjectIdentifier.cs')
-rw-r--r--crypto/src/asn1/DerObjectIdentifier.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/asn1/DerObjectIdentifier.cs b/crypto/src/asn1/DerObjectIdentifier.cs
index 96e61cdc5..44388d51f 100644
--- a/crypto/src/asn1/DerObjectIdentifier.cs
+++ b/crypto/src/asn1/DerObjectIdentifier.cs
@@ -212,7 +212,7 @@ namespace Org.BouncyCastle.Asn1
             index ^= index >> 10;
             index &= 1023;
 
-            var originalEntry = Cache[index];
+            var originalEntry = Volatile.Read(ref Cache[index]);
             if (originalEntry != null && Arrays.AreEqual(contents, originalEntry.GetContents()))
                 return originalEntry;