Set max payload in gofuzz test (#3622)

* Set max payload in gofuzz test

This was causing the test to overrun mem limits due to max payload size
check being skipped in the parser when processing a `pub` protocol line.

Signed-off-by: Waldemar Quevedo <wally@nats.io>
This commit is contained in:
Waldemar Quevedo
2022-11-14 08:28:19 -08:00
committed by GitHub
parent a64c41a7fa
commit 39185c11a6

View File

@@ -26,7 +26,7 @@ var defaultFuzzServerOptions = Options{
}
func dummyFuzzClient() *client {
return &client{srv: New(&defaultFuzzServerOptions), msubs: -1, mpay: -1, mcl: MAX_CONTROL_LINE_SIZE}
return &client{srv: New(&defaultFuzzServerOptions), msubs: -1, mpay: MAX_PAYLOAD_SIZE, mcl: MAX_CONTROL_LINE_SIZE}
}
func FuzzClient(data []byte) int {