diff --git a/accounts/keystore/presale.go b/accounts/keystore/presale.go index ed900ad085e99f4822a042de082e4b1095ef0f17..1554294e14e1f1760a9434919caecf68c0deb49f 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:] /*