Skip to content

Commit

Permalink
fuzz/crypto: add {Get,Set}Index to compactbitarray fuzzing (#9200)
Browse files Browse the repository at this point in the history
Updates #7921
Depends on #9196
  • Loading branch information
Cuong Manh Le authored and odeke-em committed Jul 28, 2021
1 parent 59733cd commit 6d520a2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
Binary file not shown.
6 changes: 6 additions & 0 deletions fuzz/crypto/types/compactbitarray/marshalunmarshal/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,11 @@ func Fuzz(data []byte) int {
if cba == nil {
panic("Inconsistency, no error, yet BitArray is nil")
}
if cba.SetIndex(-1, true) {
panic("Set negative index success")
}
if cba.GetIndex(-1) {
panic("Get negative index success")
}
return 1
}
Binary file not shown.
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ=
github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM=
github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813 h1:NgO45/5mBLRVfiXerEFzH6ikcZ7DNRPS639xFg3ENzU=
github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw=
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
Expand Down

0 comments on commit 6d520a2

Please sign in to comment.