From 25a7312e35b70e123b46bf0123b45621df807b52 Mon Sep 17 00:00:00 2001 From: Thane Thomson Date: Sun, 20 Mar 2022 14:22:30 -0400 Subject: [PATCH] Explicitly ensure length > 0 to sign vote extension Signed-off-by: Thane Thomson --- privval/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/privval/file.go b/privval/file.go index 2f00c9907..28a79f587 100644 --- a/privval/file.go +++ b/privval/file.go @@ -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