Skip to content

Commit

Permalink
Copy Into Correct Slice To Ensure Keystore Password is Set
Browse files Browse the repository at this point in the history
A previous PR refactored the clone command but
erronously overwrote the cloned value by copying
into the wrong slice before assigning the keystore
password as the empty slice. This caused future keystore
password lookups to be an empty value.

This change copies the keystore password value into the
correct slice.

Signed-off-by: Brett Logan <[email protected]>
  • Loading branch information
Brett Logan authored and mastersingh24 committed Oct 20, 2020
1 parent c6f07dd commit 3c57d11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bccsp/sw/fileks.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (ks *fileBasedKeyStore) Init(pwd []byte, path string, readOnly bool) error
ks.path = path

clone := make([]byte, len(pwd))
copy(ks.pwd, pwd)
copy(clone, pwd)
ks.pwd = clone
ks.readOnly = readOnly

Expand Down

0 comments on commit 3c57d11

Please sign in to comment.