Skip to content

Commit 7d8da66

Browse files
cosmo0920edsiper
authored andcommitted
multiline: ml: Disable multiline truncation with zero limit
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 2ff248e commit 7d8da66

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/multiline/flb_ml.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
#include <stdarg.h>
3333
#include <math.h>
34+
#include <stdint.h>
3435

3536
static inline int match_negate(struct flb_ml_parser *ml_parser, int matched)
3637
{
@@ -868,7 +869,7 @@ int flb_ml_append_event(struct flb_ml *ml, uint64_t stream_id,
868869
struct flb_ml *flb_ml_create(struct flb_config *ctx, char *name)
869870
{
870871
int result;
871-
size_t limit = 0;
872+
int64_t limit = 0;
872873
struct flb_ml *ml;
873874

874875
ml = flb_calloc(1, sizeof(struct flb_ml));
@@ -884,8 +885,8 @@ struct flb_ml *flb_ml_create(struct flb_config *ctx, char *name)
884885

885886
ml->config = ctx;
886887
limit = flb_utils_size_to_binary_bytes(ml->config->multiline_buffer_limit);
887-
if (limit > 0) {
888-
ml->buffer_limit = (size_t)limit;
888+
if (limit >= 0) {
889+
ml->buffer_limit = (size_t) limit;
889890
}
890891
else {
891892
ml->buffer_limit = FLB_ML_BUFFER_LIMIT_DEFAULT;

0 commit comments

Comments
 (0)