aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile
diff options
context:
space:
mode:
authorPaulo Gomes <pjbgf@linux.com>2023-10-03 21:24:30 +0100
committerGitHub <noreply@github.com>2023-10-03 21:24:30 +0100
commitced662e9db6667069a5255446425ec40d388f7e1 (patch)
tree9841d964156160119c2455a461c4c0a392a1b43d /plumbing/format/packfile
parent52c2972976737a00fce91d7deb1278a6a460cae6 (diff)
parentc135ec2f6a34116f63ebbdfde25001b21d560f24 (diff)
downloadgo-git-ced662e9db6667069a5255446425ec40d388f7e1.tar.gz
Merge pull request #855 from 0x34d/fuzzing
fuzzing : fuzz testing support for oss-fuzz integration
Diffstat (limited to 'plumbing/format/packfile')
-rw-r--r--plumbing/format/packfile/delta_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/plumbing/format/packfile/delta_test.go b/plumbing/format/packfile/delta_test.go
index e8f5ea6..9417e55 100644
--- a/plumbing/format/packfile/delta_test.go
+++ b/plumbing/format/packfile/delta_test.go
@@ -4,6 +4,7 @@ import (
"bytes"
"io"
"math/rand"
+ "testing"
"github.com/go-git/go-git/v5/plumbing"
. "gopkg.in/check.v1"
@@ -176,3 +177,14 @@ func (s *DeltaSuite) TestMaxCopySizeDeltaReader(c *C) {
c.Assert(err, IsNil)
c.Assert(result, DeepEquals, targetBuf)
}
+
+func FuzzPatchDelta(f *testing.F) {
+
+ f.Fuzz(func(t *testing.T, input []byte) {
+
+ input_0 := input[:len(input)/2]
+ input_1 := input[len(input)/2:]
+
+ PatchDelta(input_0, input_1)
+ })
+}