Commit e1045a76 authored by Sujatha's avatar Sujatha

MDEV-22717: Conditional jump or move depends on uninitialised value(s) in...

MDEV-22717: Conditional jump or move depends on uninitialised value(s) in find_uniq_filename(char*, unsigned long)

Fix:
===
Initialize 'number' variable to '0'.
parent 4f488569
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment