forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fuzz: add crypto/types.BitArray CompactUnmarshal fuzzer (cosmos#9166)
Updates cosmos#7921.
- Loading branch information
1 parent
2f9d3ca
commit be1c07e
Showing
21 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+6.71 MB
fuzz/crypto/types/CompactBitArray/marshalUnmarshal/compactunmarshal-fuzz.zip
Binary file not shown.
1 change: 1 addition & 0 deletions
1
.../types/CompactBitArray/marshalUnmarshal/corpus/015d776445f9c60374365850821267d19cb27e43-2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
�� |
1 change: 1 addition & 0 deletions
1
.../types/CompactBitArray/marshalUnmarshal/corpus/0ce0dda939ec4a33f3a32b8324d914929c22683a-3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
��Ԭ�F |
Binary file not shown.
1 change: 1 addition & 0 deletions
1
.../types/CompactBitArray/marshalUnmarshal/corpus/112a601c162c791bf9d3ee3f6049a640daf3d786-5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
�Ԁԋ����� |
Binary file not shown.
1 change: 1 addition & 0 deletions
1
.../types/CompactBitArray/marshalUnmarshal/corpus/203f9726741dfb8a51d9805dc7a0a7fc24a3dca7-6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
���Ԁԋ�����Ԁԋ�� |
Binary file added
BIN
+10 Bytes
.../types/CompactBitArray/marshalUnmarshal/corpus/215360d1b081bb427aebac584d739a6033ed592b-6
Binary file not shown.
1 change: 1 addition & 0 deletions
1
.../types/CompactBitArray/marshalUnmarshal/corpus/2cf6aaaa5e6b95be1ae16e0c009008cca850988a-1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
��% |
Binary file not shown.
1 change: 1 addition & 0 deletions
1
.../types/CompactBitArray/marshalUnmarshal/corpus/375632d935524abc4b939f6c8a7296aed724df82-3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
����f |
Binary file not shown.
1 change: 1 addition & 0 deletions
1
.../types/CompactBitArray/marshalUnmarshal/corpus/49d1f757a9811c755b5d6dfe884924db13853444-2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
���% |
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions
1
.../types/CompactBitArray/marshalUnmarshal/corpus/7493817f16eb4ec6cfbf667389262338ac07b1f4-4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
�ԋ��� |
1 change: 1 addition & 0 deletions
1
.../types/CompactBitArray/marshalUnmarshal/corpus/8723538b86918ded47a002c03c31b27f92395dcb-8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
����Ԁ��Ԁ��Ԁԋ���Ԁ�Ԁ��Ԁ��Ԁԋ���Ԁ�Ԁԋ���Ԁ���ԋ���Ԁ���Ԁ��Ԁ�ԋ�� |
1 change: 1 addition & 0 deletions
1
.../types/CompactBitArray/marshalUnmarshal/corpus/a600100b23e3d1792ac7cb00c41fda0d067e6e19-7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
���Ԁ��Ԁ�Ԁԋ���Ԁ���Ԁ��Ԁ�ԋ�� |
Empty file.
16 changes: 16 additions & 0 deletions
16
fuzz/crypto/types/CompactBitArray/marshalUnmarshal/main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package marshalunmarshal | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/crypto/types" | ||
) | ||
|
||
func Fuzz(data []byte) int { | ||
cba, err := types.CompactUnmarshal(data) | ||
if err != nil { | ||
return 0 | ||
} | ||
if cba == nil { | ||
panic("Inconsistency, no error, yet BitArray is nil") | ||
} | ||
return 1 | ||
} |