Commit 5cc4a891 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

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

parent d78ea3cc
......@@ -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);
......
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