You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In func GetCommitteeID in types/committee_id.go contains a potential overflow bug conversion of uint64 to uint32 as OperatorID type is uint64, but PutUint32 is used.
// Return a 32 bytes ID for the cluster of operatorsfuncGetCommitteeID(committee []OperatorID) CommitteeID {
// sortsort.Slice(committee, func(i, jint) bool {
returncommittee[i] <committee[j]
})
// Convert to bytesbytes:=make([]byte, len(committee)*4)
fori, v:=rangecommittee {
binary.LittleEndian.PutUint32(bytes[i*4:], uint32(v))
}
// Hashreturnsha256.Sum256(bytes)
}
The text was updated successfully, but these errors were encountered:
In func GetCommitteeID in types/committee_id.go contains a potential overflow bug conversion of
uint64
touint32
as OperatorID type isuint64
, butPutUint32
is used.The text was updated successfully, but these errors were encountered: