Skip to content
Snippets Groups Projects
Commit 5cc4a891 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard
Browse files

msi: Fix a heap corruption bug by resizing the src string before adding to it.

parent d78ea3cc
No related branches found
No related tags found
No related merge requests found
......@@ -469,8 +469,13 @@ static UINT download_remote_cabinet(MSIPACKAGE *package, struct media_info *mi)
*(ptr + 1) = '\0';
ptr = strrchrW(mi->source, '\\');
src = msi_realloc(src, (lstrlenW(src) + lstrlenW(ptr)) * sizeof(WCHAR));
if (!src)
return ERROR_OUTOFMEMORY;
lstrcatW(src, ptr + 1);
temppath[0] = '\0';
cab = msi_download_file(src, temppath);
lstrcpyW(mi->source, cab);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment