Skip to content

Commit

Permalink
Try to fix oss-fuzz low memory limit again
Browse files Browse the repository at this point in the history
  • Loading branch information
erikdubbelboer committed May 8, 2024
1 parent 96b2369 commit 8f5b927
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@ func FuzzResponseReadLimitBody(f *testing.F) {
return
}

var res Response
res := AcquireResponse()
defer ReleaseResponse(res)

_ = res.ReadLimitBody(bufio.NewReader(bytes.NewReader(body)), max)
w := bytes.Buffer{}
_, _ = res.WriteTo(&w)
})
}

Expand All @@ -63,11 +62,10 @@ func FuzzRequestReadLimitBody(f *testing.F) {
return
}

var req Request
req := AcquireRequest()
defer ReleaseRequest(req)

_ = req.ReadLimitBody(bufio.NewReader(bytes.NewReader(body)), max)
w := bytes.Buffer{}
_, _ = req.WriteTo(&w)
})
}

Expand Down

0 comments on commit 8f5b927

Please sign in to comment.