From: Victor Julien Date: Thu, 23 Nov 2023 05:49:12 +0000 (+0100) Subject: eve/alert: init membuffer size on missing config X-Git-Tag: suricata-7.0.7~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e501e259138f8e93565895f703e9ef26c65de79;p=thirdparty%2Fsuricata.git eve/alert: init membuffer size on missing config Don't init buffer to 0 size but use the desired default of 4k. (cherry picked from commit 462a6d7913c927dba7d1d8313acf137d7d87b071) --- diff --git a/src/output-json-alert.c b/src/output-json-alert.c index c7bbf7d3d8..1ca42df8ad 100644 --- a/src/output-json-alert.c +++ b/src/output-json-alert.c @@ -1137,14 +1137,13 @@ static void JsonAlertLogSetupMetadata(AlertJsonOutputCtx *json_output_ctx, warn_no_meta = true; } } - - json_output_ctx->payload_buffer_size = payload_buffer_size; } if (flags & LOG_JSON_RULE_METADATA) { DetectEngineSetParseMetadata(); } + json_output_ctx->payload_buffer_size = payload_buffer_size; json_output_ctx->flags |= flags; }