mirror of
https://github.com/reactos/wine.git
synced 2025-01-31 17:23:53 +00:00
mmdevapi: Include space for the terminating zero in info_device_ps_GetValue().
This commit is contained in:
parent
d23938de1e
commit
a4fddf5fc8
@ -1246,11 +1246,12 @@ static HRESULT WINAPI info_device_ps_GetValue(IPropertyStore *iface,
|
||||
|
||||
if (IsEqualPropertyKey(*key, DEVPKEY_Device_Driver))
|
||||
{
|
||||
INT size = (lstrlenW(drvs.module_name) + 1) * sizeof(WCHAR);
|
||||
pv->vt = VT_LPWSTR;
|
||||
pv->u.pwszVal = CoTaskMemAlloc(lstrlenW(drvs.module_name) * sizeof(WCHAR));
|
||||
pv->u.pwszVal = CoTaskMemAlloc(size);
|
||||
if (!pv->u.pwszVal)
|
||||
return E_OUTOFMEMORY;
|
||||
lstrcpyW(pv->u.pwszVal, drvs.module_name);
|
||||
memcpy(pv->u.pwszVal, drvs.module_name, size);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user