Fix out-of-bound read found with AddressSanitizer Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com> --- data/src/cfs-utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/data/src/cfs-utils.c b/data/src/cfs-utils.c index 2c91621..acf65b2 100644 --- a/data/src/cfs-utils.c +++ b/data/src/cfs-utils.c @@ -167,9 +167,9 @@ cluster_config_version( GRegex *regex; GMatchInfo *match_info; guint64 version = 0; - + regex = g_regex_new ("config_version\\s*:\\s*(\\d+)", 0, 0, NULL); - g_regex_match (regex, config_data, 0, &match_info); + g_regex_match_full(regex, config_data, config_length, 0, 0, &match_info, NULL); if (g_match_info_matches (match_info)) { gchar *word = g_match_info_fetch (match_info, 1); if (strlen(word)) { -- 2.20.1 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel