diff options
author | Brian Carlstrom <bdc@google.com> | 2013-04-24 17:12:22 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2013-04-24 17:15:41 -0700 |
commit | a5cc81bb305432bae2fe6d007a992ec1ede0b387 (patch) | |
tree | 0884afa40c5ec04809b30f84805603a92994f61f /luni | |
parent | ec568ac4104af3f42d6068798a18d4cfe635f0e6 (diff) | |
download | libcore-a5cc81bb305432bae2fe6d007a992ec1ede0b387.zip libcore-a5cc81bb305432bae2fe6d007a992ec1ede0b387.tar.gz libcore-a5cc81bb305432bae2fe6d007a992ec1ede0b387.tar.bz2 |
Do not set valueDecoded until after the value is decoded
Bug: https://code.google.com/p/chromium/issues/detail?id=233610
Bug: 8712523
Change-Id: I976df514e761ffe0d1be1ca8b18e9fe5050c2ba7
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/main/java/org/apache/harmony/security/x509/Extension.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/Extension.java b/luni/src/main/java/org/apache/harmony/security/x509/Extension.java index e5011e8..d9b02f9 100644 --- a/luni/src/main/java/org/apache/harmony/security/x509/Extension.java +++ b/luni/src/main/java/org/apache/harmony/security/x509/Extension.java @@ -99,7 +99,7 @@ public final class Extension { // the decoded extension value protected ExtensionValue extnValueObject; // tells whether extension value has been decoded or not - private boolean valueDecoded = false; + private volatile boolean valueDecoded = false; public Extension(String extnID, boolean critical, ExtensionValue extnValueObject) { @@ -240,7 +240,6 @@ public final class Extension { if (valueDecoded) { return; } - valueDecoded = true; if (Arrays.equals(extnID, SUBJ_KEY_ID)) { extnValueObject = SubjectKeyIdentifier.decode(extnValue); } else if (Arrays.equals(extnID, KEY_USAGE)) { @@ -284,6 +283,7 @@ public final class Extension { } else if (Arrays.equals(extnID, SUBJECT_INFO_ACCESS)) { extnValueObject = InfoAccessSyntax.decode(extnValue); } + valueDecoded = true; } public void dumpValue(StringBuilder sb, String prefix) { |