Skip to content

Commit

Permalink
filter_rewrite_tag: add NULL check(fluent#4246)
Browse files Browse the repository at this point in the history
Signed-off-by: Takahiro Yamashita <[email protected]>
  • Loading branch information
nokute78 authored and edsiper committed Nov 29, 2021
1 parent 6711442 commit 8a19124
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/filter_rewrite_tag/rewrite_tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,14 @@ static int process_config(struct flb_rewrite_tag *ctx)

static int is_wildcard(char* match)
{
size_t len = strlen(match);
size_t len;
size_t i;

if (match == NULL) {
return 0;
}
len = strlen(match);

/* '***' should be ignored. So we check every char. */
for (i=0; i<len; i++) {
if (match[i] != '*') {
Expand Down

0 comments on commit 8a19124

Please sign in to comment.