From e1045a768b23ff3847e6ed96d51627b8529d3138 Mon Sep 17 00:00:00 2001 From: Sujatha Date: Wed, 27 May 2020 13:53:39 +0530 Subject: MDEV-22717: Conditional jump or move depends on uninitialised value(s) in find_uniq_filename(char*, unsigned long) Fix: === Initialize 'number' variable to '0'. --- sql/log.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql/log.cc') diff --git a/sql/log.cc b/sql/log.cc index 9a5603f9ce7..fbc591cbebf 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2431,7 +2431,7 @@ static int find_uniq_filename(char *name, ulong next_log_number) char buff[FN_REFLEN], ext_buf[FN_REFLEN]; struct st_my_dir *dir_info; struct fileinfo *file_info; - ulong max_found, next, number; + ulong max_found= 0, next= 0, number= 0; size_t buf_length, length; char *start, *end; int error= 0; @@ -2457,7 +2457,7 @@ static int find_uniq_filename(char *name, ulong next_log_number) if (strncmp(file_info->name, start, length) == 0 && test_if_number(file_info->name+length, &number,0)) { - set_if_bigger(max_found,(ulong) number); + set_if_bigger(max_found, number); } } my_dirend(dir_info); -- cgit v1.2.1