Skip to content

Commit

Permalink
fixed panic identified in fuzzing
Browse files Browse the repository at this point in the history
  • Loading branch information
CluEleSsUK committed Jan 9, 2024
1 parent 52b3df7 commit 070afae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/dkg/actions_passive.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ func (d *Process) Packet(ctx context.Context, packet *drand.GossipPacket) (*dran

packetName := packetName(packet)
packetSig := hex.EncodeToString(packet.Metadata.Signature)
if len(packetSig) < 8 {
return nil, errors.New("packet signature is too short")
}
shortSig := packetSig[0:8]
d.log.Debugw("processing DKG gossip packet", "type", packetName, "sig", shortSig)
_, span := tracer.NewSpan(ctx, fmt.Sprintf("packet.%s", packetName))
Expand Down

0 comments on commit 070afae

Please sign in to comment.