Skip to content

Commit

Permalink
config: fix property values being truncated.
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Whelan <[email protected]>
  • Loading branch information
pwhelan authored and edsiper committed Oct 10, 2022
1 parent 58d44a4 commit d6dc1e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/config_format/flb_config_format.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ struct cfl_variant *flb_cf_section_property_add(struct flb_cf *cf,
}

if (v_len == 0) {
v_len = strlen(k_buf);
v_len = strlen(v_buf);
}
val = flb_sds_create_len(v_buf, v_len);
if (val == NULL) {
Expand Down
3 changes: 2 additions & 1 deletion src/fluent-bit.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,14 +723,15 @@ static int service_configure_plugin(struct flb_config *config,
ins = flb_output_new(config, tmp, NULL, FLB_TRUE);
}
flb_sds_destroy(tmp);
flb_sds_destroy(name);

/* validate the instance creation */
if (!ins) {
flb_error("[config] section '%s' tried to instance a plugin name "
"that don't exists", name);
flb_sds_destroy(name);
return -1;
}
flb_sds_destroy(name);

/*
* iterate section properties and populate instance by using specific
Expand Down

0 comments on commit d6dc1e9

Please sign in to comment.