From 084aa8ba805c731f0539d986876ae3b3a479dc23 Mon Sep 17 00:00:00 2001 From: Christopher Puschmann Date: Mon, 1 Apr 2024 21:21:30 +0200 Subject: [PATCH] Revert "fix: Limit maximum BER packet length in `FuzzParseDN` to 65536 bytes (#466)" This reverts commit 80095a39 --- fuzz_test.go | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/fuzz_test.go b/fuzz_test.go index af4e341..74e1a66 100644 --- a/fuzz_test.go +++ b/fuzz_test.go @@ -3,22 +3,7 @@ package ldap -import ( - "os" - "testing" - - ber "github.com/go-asn1-ber/asn1-ber" -) - -func TestMain(m *testing.M) { - // For fuzz tests - // See https://github.com/go-asn1-ber/asn1-ber/blob/04301b4b1c5ff66221f8f8a394f814a9917d678a/fuzz_test.go#L33-L37 - // for why this limitation is necessary - ber.MaxPacketLengthBytes = 65536 - - code := m.Run() - os.Exit(code) -} +import "testing" func FuzzParseDN(f *testing.F) { f.Add("*") @@ -33,7 +18,6 @@ func FuzzParseDN(f *testing.F) { } func FuzzDecodeEscapedSymbols(f *testing.F) { - f.Add([]byte("a\u0100\x80")) f.Add([]byte(`start\d`)) f.Add([]byte(`\`)) @@ -46,7 +30,6 @@ func FuzzDecodeEscapedSymbols(f *testing.F) { } func FuzzEscapeDN(f *testing.F) { - f.Add("test,user") f.Add("#test#user#") f.Add("\\test\\user\\")