Skip to content

Commit

Permalink
Merge pull request #169 from alltilla/rate-limit-parse-error-segfault…
Browse files Browse the repository at this point in the history
…-fix

rate-limit: parse error segfault fix
  • Loading branch information
MrAnno authored Jun 19, 2024
2 parents 8d2dba5 + cc89c20 commit 0b0f87e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/rate-limit-filter/rate-limit-parser.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*
* Copyright (c) 2021 One Identity
* Copyright (c) 2024 Axoflow
* Copyright (c) 2024 Attila Szakacs <attila.szakacs@axoflow.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
Expand Down Expand Up @@ -46,7 +48,7 @@ CfgParser rate_limit_filter_parser =
.name = "rate-limit-filter",
.keywords = rate_limit_filter_keywords,
.parse = (gint (*)(CfgLexer *, gpointer *, gpointer)) rate_limit_filter_parse,
.cleanup = (void (*)(gpointer)) log_pipe_unref,
.cleanup = (void (*)(gpointer)) filter_expr_unref,
};

CFG_PARSER_IMPLEMENT_LEXER_BINDING(rate_limit_filter_, RATE_LIMIT_FILTER_, FilterExprNode **)
3 changes: 3 additions & 0 deletions news/bugfix-169.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
`rate-limit()`: Fixed a crash which occured on a config parse failure.

!!!! TODO: add `nivelus` to contributors in the newsfile.

0 comments on commit 0b0f87e

Please sign in to comment.