Skip to content

Commit

Permalink
channeldb/graph: write max 80 sig len for nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
halseth committed Dec 5, 2018
1 parent 5dcd2a4 commit 3d7bbd6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions channeldb/graph.go
Expand Up @@ -2839,6 +2839,12 @@ func putLightningNode(nodeBucket *bbolt.Bucket, aliasBucket *bbolt.Bucket,
}
}

sigLen := len(node.AuthSigBytes)
if sigLen > 80 {
return fmt.Errorf("max sig len allowed is 80, had %v",
sigLen)
}

err = wire.WriteVarBytes(&b, 0, node.AuthSigBytes)
if err != nil {
return err
Expand Down

0 comments on commit 3d7bbd6

Please sign in to comment.