mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
usbwallet: check returned error when decoding hexstr
This commit is contained in:
parent
cf3b187bde
commit
b172afd1cc
1 changed files with 4 additions and 1 deletions
|
|
@ -257,7 +257,10 @@ func (w *ledgerDriver) ledgerDerive(derivationPath []uint32) (common.Address, er
|
|||
|
||||
// Decode the hex sting into an Ethereum address and return
|
||||
var address common.Address
|
||||
hex.Decode(address[:], hexstr)
|
||||
_, err = hex.Decode(address[:], hexstr)
|
||||
if err != nil {
|
||||
return common.Address{}, err
|
||||
}
|
||||
return address, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue