summaryrefslogtreecommitdiffstats
path: root/base/util/src/netscape
diff options
context:
space:
mode:
Diffstat (limited to 'base/util/src/netscape')
-rw-r--r--base/util/src/netscape/security/acl/AclImpl.java8
-rw-r--r--base/util/src/netscape/security/provider/MD5.java4
2 files changed, 8 insertions, 4 deletions
diff --git a/base/util/src/netscape/security/acl/AclImpl.java b/base/util/src/netscape/security/acl/AclImpl.java
index 884304301..9ccb0fc1f 100644
--- a/base/util/src/netscape/security/acl/AclImpl.java
+++ b/base/util/src/netscape/security/acl/AclImpl.java
@@ -370,9 +370,11 @@ final class AclEnumerator implements Enumeration<AclEntry> {
}
public boolean hasMoreElements() {
- return (u1.hasMoreElements() ||
- u2.hasMoreElements() ||
- g1.hasMoreElements() || g2.hasMoreElements());
+ synchronized (acl) {
+ return (u1.hasMoreElements() ||
+ u2.hasMoreElements() ||
+ g1.hasMoreElements() || g2.hasMoreElements());
+ }
}
public AclEntry nextElement() {
diff --git a/base/util/src/netscape/security/provider/MD5.java b/base/util/src/netscape/security/provider/MD5.java
index e64873942..85f9da12d 100644
--- a/base/util/src/netscape/security/provider/MD5.java
+++ b/base/util/src/netscape/security/provider/MD5.java
@@ -230,7 +230,9 @@ public final class MD5 extends MessageDigestSpi implements Cloneable {
public void init() {
state = new int[4];
transformBuffer = new int[16];
- buffer = new byte[64];
+ synchronized (this) {
+ buffer = new byte[64];
+ }
digestBits = new byte[16];
count = 0;
// Load magic initialization constants.