From d649c15dcf5815c0f6096d58c187b4d624fead56 Mon Sep 17 00:00:00 2001 From: RainRat Date: Thu, 30 Nov 2023 15:41:00 -0800 Subject: [PATCH] Fix minor struct initialization copy-paste bug Incorrect `memset` use in `cli_regex2suffix` does not fully clear the `root_node` structure. --- libclamav/regex_suffix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libclamav/regex_suffix.c b/libclamav/regex_suffix.c index 6161413467..a089df47c9 100644 --- a/libclamav/regex_suffix.c +++ b/libclamav/regex_suffix.c @@ -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, ®ex);