Skip to content

Commit

Permalink
filter: Plug a SEGV case for fqname
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
  • Loading branch information
cosmo0920 authored and edsiper committed Feb 23, 2024
1 parent 9335a44 commit d3ca531
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cmt_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ static int compare_fqname(struct cmt_opts *src, const char *fqname,
size_t fqname_size;

if (flags & CMT_FILTER_PREFIX) {
if (fqname == NULL) {
return CMT_FALSE;
}

fqname_size = strlen(fqname);
}
else if (compare_ctx != NULL && compare != NULL) {
Expand Down

0 comments on commit d3ca531

Please sign in to comment.