aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorArjun Singh <ajsinghyadav00@gmail.com>2023-10-01 14:53:58 +0530
committerArjun Singh <ajsinghyadav00@gmail.com>2023-10-02 07:22:29 +0530
commitc135ec2f6a34116f63ebbdfde25001b21d560f24 (patch)
treeac426727bc440f94b270fdd6a3c3bd706a413457 /utils
parent85f63b17e011872817117a38f92f08a1e01297bb (diff)
downloadgo-git-c135ec2f6a34116f63ebbdfde25001b21d560f24.tar.gz
fuzzing : fuzz testing support for oss-fuzz integration
Signed-off-by: Arjun Singh <ajsinghyadav00@gmail.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/merkletrie/internal/fsnoder/new_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/merkletrie/internal/fsnoder/new_test.go b/utils/merkletrie/internal/fsnoder/new_test.go
index ad069c7..52b3dc4 100644
--- a/utils/merkletrie/internal/fsnoder/new_test.go
+++ b/utils/merkletrie/internal/fsnoder/new_test.go
@@ -1,6 +1,8 @@
package fsnoder
import (
+ "testing"
+
"github.com/go-git/go-git/v5/utils/merkletrie/noder"
. "gopkg.in/check.v1"
@@ -352,3 +354,10 @@ func (s *FSNoderSuite) TestHashEqual(c *C) {
c.Assert(HashEqual(t3, t1), Equals, false)
c.Assert(HashEqual(t1, t3), Equals, false)
}
+
+func FuzzDecodeFile(f *testing.F) {
+
+ f.Fuzz(func(t *testing.T, input []byte) {
+ decodeFile(input)
+ })
+}