fuzz: change return values to 1 rather than 0 or -1

This allows gofuzz to store the mutating input as coverage if it reaches
any new coverage, even if it didn't make it to the end of the test.
This commit is contained in:
eugene committed 2020-10-13 15:17:57 -04:00
1 parent d26001a69a
commit f82653cb06
19 files changed
+24 -24

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ import (
func Fuzz_random_actone(data []byte) int {
// Check if data is large enough.
if len(data) < brontide.ActOneSize {
return -1
return 1
}
// This will return brontide machines with random keys.
+1 -1
View File
@@ -11,7 +11,7 @@ import (
func Fuzz_random_actthree(data []byte) int {
// Check if data is large enough.
if len(data) < brontide.ActThreeSize {
return -1
return 1
}
// This will return brontide machines with random keys.
+1 -1
View File
@@ -11,7 +11,7 @@ import (
func Fuzz_random_acttwo(data []byte) int {
// Check if data is large enough.
if len(data) < brontide.ActTwoSize {
return -1
return 1
}
// This will return brontide machines with random keys.
+1 -1
View File
@@ -12,7 +12,7 @@ import (
func Fuzz_random_init_enc_dec(data []byte) int {
// Ensure that length of message is not greater than max allowed size.
if len(data) > math.MaxUint16 {
return 0
return 1
}
// This will return brontide machines with random keys.
+1 -1
View File
@@ -12,7 +12,7 @@ import (
func Fuzz_random_init_encrypt(data []byte) int {
// Ensure that length of message is not greater than max allowed size.
if len(data) > math.MaxUint16 {
return 0
return 1
}
// This will return brontide machines with random keys.
+1 -1
View File
@@ -12,7 +12,7 @@ import (
func Fuzz_random_resp_enc_dec(data []byte) int {
// Ensure that length of message is not greater than max allowed size.
if len(data) > math.MaxUint16 {
return 0
return 1
}
// This will return brontide machines with random keys.
+1 -1
View File
@@ -12,7 +12,7 @@ import (
func Fuzz_random_resp_encrypt(data []byte) int {
// Ensure that length of message is not greater than max allowed size.
if len(data) > math.MaxUint16 {
return 0
return 1
}
// This will return brontide machines with random keys.
+1 -1
View File
@@ -11,7 +11,7 @@ import (
func Fuzz_static_actone(data []byte) int {
// Check if data is large enough.
if len(data) < brontide.ActOneSize {
return -1
return 1
}
// This will return brontide machines with static keys.
+1 -1
View File
@@ -11,7 +11,7 @@ import (
func Fuzz_static_actthree(data []byte) int {
// Check if data is large enough.
if len(data) < brontide.ActThreeSize {
return -1
return 1
}
// This will return brontide machines with static keys.
+1 -1
View File
@@ -11,7 +11,7 @@ import (
func Fuzz_static_acttwo(data []byte) int {
// Check if data is large enough.
if len(data) < brontide.ActTwoSize {
return -1
return 1
}
// This will return brontide machines with static keys.
+1 -1
View File
@@ -13,7 +13,7 @@ import (
func Fuzz_static_init_enc_dec(data []byte) int {
// Ensure that length of message is not greater than max allowed size.
if len(data) > math.MaxUint16 {
return 0
return 1
}
// This will return brontide machines with static keys.
+1 -1
View File
@@ -12,7 +12,7 @@ import (
func Fuzz_static_init_encrypt(data []byte) int {
// Ensure that length of message is not greater than max allowed size.
if len(data) > math.MaxUint16 {
return 0
return 1
}
// This will return brontide machines with static keys.
+1 -1
View File
@@ -12,7 +12,7 @@ import (
func Fuzz_static_resp_enc_dec(data []byte) int {
// Ensure that length of message is not greater than max allowed size.
if len(data) > math.MaxUint16 {
return 0
return 1
}
// This will return brontide machines with static keys.
+1 -1
View File
@@ -12,7 +12,7 @@ import (
func Fuzz_static_resp_encrypt(data []byte) int {
// Ensure that length of message is not greater than max allowed size.
if len(data) > math.MaxUint16 {
return 0
return 1
}
// This will return brontide machines with static keys.