Merge pull request #15698 from original-brownbear/15668

accounts/keystore: Improved error message
This commit is contained in:
Péter Szilágyi 2017-12-18 13:43:10 +02:00 committed by GitHub
commit 3b79bac05b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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:]
/*