Skip to content

Commit

Permalink
Fix minor struct initialization copy-paste bug
Browse files Browse the repository at this point in the history
Incorrect `memset` use in `cli_regex2suffix` does not fully clear
the `root_node` structure.
  • Loading branch information
RainRat authored Nov 30, 2023
1 parent 63fa9b4 commit d649c15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libclamav/regex_suffix.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ cl_error_t cli_regex2suffix(const char *pattern, regex_t *preg, suffix_callback
goto done;
}
memset(&buf, 0, sizeof(buf));
memset(&root_node, 0, sizeof(buf));
memset(&root_node, 0, sizeof(root_node));
n->parent = &root_node;

rc = build_suffixtree_descend(n, &buf, cb, cbdata, &regex);
Expand Down

0 comments on commit d649c15

Please sign in to comment.