Commit 35706b6b authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Fixed a memory overflow and leak identified by Mike McCormack.

parent f3491aa9
......@@ -3709,7 +3709,7 @@ UINT ACTION_ResolveSource(MSIPACKAGE* package)
INSTALLPROPERTY_DISKPROMPTW,NULL,&size);
if (rc == ERROR_MORE_DATA)
{
prompt = HeapAlloc(GetProcessHeap(),0,size);
prompt = HeapAlloc(GetProcessHeap(),0,size * sizeof(WCHAR));
MsiSourceListGetInfoW(package->ProductCode, NULL,
MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT,
INSTALLPROPERTY_DISKPROMPTW,prompt,&size);
......@@ -3728,6 +3728,7 @@ UINT ACTION_ResolveSource(MSIPACKAGE* package)
}
attrib = GetFileAttributesW(package->PackagePath);
}
HeapFree(GetProcessHeap(),0,prompt);
rc = ERROR_SUCCESS;
}
else
......
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