Skip to content

Commit

Permalink
Merge pull request #631 from JeanOUINA/master
Browse files Browse the repository at this point in the history
fix wallet_addEntropyStore crash bug
  • Loading branch information
KarlChristomer authored Nov 27, 2022
2 parents 46bd60e + 709c3ea commit 2c70bc5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wallet/entropystore/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ func IsMayValidEntropystoreFile(path string) (bool, *types.Address, error) {
return false, nil, err
}

if !fi.Mode().IsRegular() {
return false, nil, nil
}

// out keystore file size is about 500 so if chain file is very large it must not be chain keystore file
if fi.Size() > 2*1024 {
return false, nil, nil
Expand Down

0 comments on commit 2c70bc5

Please sign in to comment.