Skip to content

Commit

Permalink
KeyChainGroup: defensive copy of the chains list in the c'tor
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehearn committed May 29, 2014
1 parent 1628bf6 commit 960b9d6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public KeyChainGroup(DeterministicKey watchKey) {
// Used for deserialization.
private KeyChainGroup(@Nullable BasicKeyChain basicKeyChain, List<DeterministicKeyChain> chains, @Nullable KeyCrypter crypter) {
this.basic = basicKeyChain == null ? new BasicKeyChain() : basicKeyChain;
this.chains = checkNotNull(chains);
this.chains = new ArrayList<DeterministicKeyChain>(checkNotNull(chains));
this.keyCrypter = crypter;
this.currentKeys = new EnumMap<KeyChain.KeyPurpose, DeterministicKey>(KeyChain.KeyPurpose.class);
}
Expand Down

0 comments on commit 960b9d6

Please sign in to comment.