diff --git a/plugins/drng/plugin.go b/plugins/drng/plugin.go index 5b43673e688f8d42daf7b997082917921bf31c78..66ca57be89856b1ee8f20fc7822c66a0fbaa64a1 100644 --- a/plugins/drng/plugin.go +++ b/plugins/drng/plugin.go @@ -5,6 +5,7 @@ import ( "github.com/iotaledger/goshimmer/packages/binary/drng" "github.com/iotaledger/goshimmer/packages/binary/drng/payload" + "github.com/iotaledger/goshimmer/packages/binary/drng/payload/header" "github.com/iotaledger/goshimmer/packages/binary/drng/state" cbPayload "github.com/iotaledger/goshimmer/packages/binary/drng/subtypes/collectiveBeacon/payload" "github.com/iotaledger/goshimmer/packages/binary/messagelayer/message" @@ -68,6 +69,9 @@ func configureEvents() { cachedMessageMetadata.Release() cachedMessage.Consume(func(msg *message.Message) { + if len(msg.Payload().Bytes()) < header.Length { + return + } marshalUtil := marshalutil.New(msg.Payload().Bytes()) parsedPayload, err := payload.Parse(marshalUtil) if err != nil {