From 39185c11a69e2ccfa2284bad644ccd5c30f7d419 Mon Sep 17 00:00:00 2001 From: Waldemar Quevedo Date: Mon, 14 Nov 2022 08:28:19 -0800 Subject: [PATCH] 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 --- server/fuzz.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/fuzz.go b/server/fuzz.go index 86109cd3..ad378eb7 100644 --- a/server/fuzz.go +++ b/server/fuzz.go @@ -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 {