Commit d90aca35 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Add a NULL terminator to file->dest after reallocation.

parent b13803ea
......@@ -5288,6 +5288,11 @@ static BOOL move_files_wildcard(LPWSTR source, LPWSTR dest, int options)
goto done;
}
/* file->dest may be shorter after the reallocation, so add a NULL
* terminator. This is needed for the call to strrchrW, as there will no
* longer be a NULL terminator within the bounds of the allocation in this case.
*/
file->dest[size - 1] = '\0';
lstrcpyW(strrchrW(file->dest, '\\') + 1, file->destname);
while (!list_empty(&files.entry))
......
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