Explicitly ensure length > 0 to sign vote extension

Signed-off-by: Thane Thomson <connect@thanethomson.com>
This commit is contained in:
Thane Thomson
2022-03-20 14:22:30 -04:00
parent ab50582319
commit 25a7312e35

View File

@@ -404,7 +404,7 @@ func (pv *FilePV) signVote(chainID string, vote *tmproto.Vote) error {
vote.Signature = sig
// Sign the vote extension, if any
if vote.Extension != nil {
if len(vote.Extension) > 0 {
vote.ExtensionSignature, err = pv.Key.PrivKey.Sign(vote.Extension)
if err != nil {
return err