Commit ecfa0fbc authored by Dan Kegel's avatar Dan Kegel Committed by Alexandre Julliard

msi: MsiSourceListEnumMediaDisksW: free original string, not substring.

parent 8f7f2036
...@@ -304,15 +304,14 @@ UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode, ...@@ -304,15 +304,14 @@ UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode,
if (pcchDiskPrompt) if (pcchDiskPrompt)
{ {
data = ptr; if (!*ptr)
if (!*data) ptr++;
data++;
size = lstrlenW(data); size = lstrlenW(ptr);
if (size >= *pcchDiskPrompt) if (size >= *pcchDiskPrompt)
r = ERROR_MORE_DATA; r = ERROR_MORE_DATA;
else if (szDiskPrompt) else if (szDiskPrompt)
lstrcpyW(szDiskPrompt, data); lstrcpyW(szDiskPrompt, ptr);
*pcchDiskPrompt = size; *pcchDiskPrompt = size;
} }
......
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