Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parser: fix segmentation fault on "Types" option #2200

Merged
merged 1 commit into from
Jun 4, 2020

Conversation

fujimotos
Copy link
Member

Thomas Heggelund reported a segmentation fault issue on the "Types"
option. His configuration was:

[PARSER]
    Name    dips-log4net-multiline
    Format  regex
    Regex   ^(?<test>.*)$
    Types test:integer

It turned out that c197f1c introduced a new method get_parser_key()
but forgot to apply that change to some option.

Due to this inconsistency, it ended up calling flb_sds_destroy() on a
plain char*. Resolve that issue by fixing the inconsistent key
retrieval.

Signed-off-by: Fujimoto Seiji fujimoto@ceptord.net

Thomas Heggelund reported a segmentation fault issue on the "Types"
option. His configuration was:

    [PARSER]
        Name    dips-log4net-multiline
        Format  regex
        Regex   ^(?<test>.*)$
        Types test:integer

It turned out that c197f1c introduced a new method get_parser_key()
but forgot to apply that change to some option.

Due to this inconsistency, it ended up calling flb_sds_destroy() on a
plain char*. Resolve that issue by fixing the inconsistent key
retrieval.

Signed-off-by: Fujimoto Seiji <fujimoto@ceptord.net>
@edsiper
Copy link
Member

edsiper commented Jun 4, 2020

thanks

@fujimotos fujimotos deleted the sf/flb-types-segf branch June 11, 2020 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants