aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/keystore
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/keystore')
-rw-r--r--accounts/keystore/presale.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/accounts/keystore/presale.go b/accounts/keystore/presale.go
index ed900ad08..1554294e1 100644
--- a/accounts/keystore/presale.go
+++ b/accounts/keystore/presale.go
@@ -58,6 +58,9 @@ func decryptPreSaleKey(fileContent []byte, password string) (key *Key, err error
if err != nil {
return nil, errors.New("invalid hex in encSeed")
}
+ if len(encSeedBytes) < 16 {
+ return nil, errors.New("invalid encSeed, too short")
+ }
iv := encSeedBytes[:16]
cipherText := encSeedBytes[16:]
/*