Prysm: `IntersectionUint64`, `IntersectionInt64`, `IntersectionByteSlices` return union if more than 2 slices are provided

Created on 29 May 2020  路  2Comments  路  Source: prysmaticlabs/prysm

馃悶 Bug Report

Description

Pointed out by the Quantstamp team, the current function to return an intersection of input slices fails to return the intersection. Instead, it returns the union: https://play.golang.org/p/ewIKeH0sNoR

It works with two slices. But no more than that.

Implementation: https://github.com/prysmaticlabs/prysm/blob/master/shared/sliceutil/slice.go#L36

Audit Bug High

All 2 comments

same bug occurs in IntersectionInt64()

also in IntersectionByteSlices(), see https://play.golang.org/p/rfqqq1FPA_N

Was this page helpful?
0 / 5 - 0 ratings

Related issues

terencechain picture terencechain  路  4Comments

stefa2k picture stefa2k  路  5Comments

shayzluf picture shayzluf  路  4Comments

prestonvanloon picture prestonvanloon  路  4Comments

0mkara picture 0mkara  路  4Comments