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

advpack: Leave room for the NULL terminator in the working_dir string.

parent 48b55afa
......@@ -306,11 +306,11 @@ HRESULT install_init(LPCWSTR inf_filename, LPCWSTR install_sec,
}
else
{
len = lstrlenW(working_dir);
len = lstrlenW(working_dir) + 1;
ptr = working_dir;
}
info->working_dir = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR));
info->working_dir = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (!info->working_dir)
return E_OUTOFMEMORY;
......
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