mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
regedit: Fix an out-of-bounds array access (clang).
Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0adf2af7ff
commit
fe517f9256
1 changed files with 2 additions and 2 deletions
|
@ -105,8 +105,8 @@ static void get_file_name(CHAR **command_line, CHAR *file_name)
|
|||
}
|
||||
}
|
||||
memcpy(file_name, *command_line, pos * sizeof((*command_line)[0]));
|
||||
/* remove the last backslash */
|
||||
if (file_name[pos - 1] == '\\') {
|
||||
/* Terminate the string and remove the trailing backslash */
|
||||
if (pos > 0 && file_name[pos - 1] == '\\') {
|
||||
file_name[pos - 1] = '\0';
|
||||
} else {
|
||||
file_name[pos] = '\0';
|
||||
|
|
Loading…
Reference in a new issue