Skip to content

Commit

Permalink
Revert "fix: Limit maximum BER packet length in FuzzParseDN to 6553…
Browse files Browse the repository at this point in the history
…6 bytes (go-ldap#466)"

This reverts commit 80095a3
  • Loading branch information
cpuschma committed Apr 1, 2024
1 parent ff74b2c commit 084aa8b
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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("*")
Expand All @@ -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(`\`))
Expand All @@ -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\\")
Expand Down

0 comments on commit 084aa8b

Please sign in to comment.