mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Added a test for slice bounds out of range
This commit is contained in:
parent
4039583ccd
commit
a1f6321b1d
1 changed files with 23 additions and 0 deletions
23
roaring/fuzz_test.go
Normal file
23
roaring/fuzz_test.go
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
package roaring
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestUnmarshalBinary(t *testing.T) {
|
||||
b := NewBitmap()
|
||||
confirmedCrashers := []struct {
|
||||
cr []byte
|
||||
} {
|
||||
{cr : []byte(":000000")},
|
||||
{cr : []byte("<000000000000000")},
|
||||
}
|
||||
|
||||
for _, crash := range confirmedCrashers {
|
||||
err := b.UnmarshalBinary(crash.cr)
|
||||
if err != nil {
|
||||
t.Error("Known crasher failed.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue