mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 05:57:27 +00:00
scrrun: Correct string length returned from GetTempName.
You have to pass string length without terminal null to SysAllocStringLen. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53569
This commit is contained in:
parent
412e1de2b4
commit
1f4c48a000
|
@ -3449,7 +3449,7 @@ static HRESULT WINAPI filesys_GetTempName(IFileSystem3 *iface, BSTR *result)
|
|||
if (!result)
|
||||
return E_POINTER;
|
||||
|
||||
if (!(*result = SysAllocStringLen(NULL, 13)))
|
||||
if (!(*result = SysAllocStringLen(NULL, 12)))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
if(!RtlGenRandom(&random, sizeof(random)))
|
||||
|
|
|
@ -485,7 +485,7 @@ static void test_GetTempName(void)
|
|||
hr = IFileSystem3_GetTempName(fs3, &result);
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
ok(!!wcsstr( result,L".tmp"), "GetTempName returned %s, expected .tmp suffix\n", debugstr_w(result));
|
||||
todo_wine ok(SysStringLen(result) == lstrlenW(result),"GetTempName returned %s, has incorrect string len.\n", debugstr_w(result));
|
||||
ok(SysStringLen(result) == lstrlenW(result),"GetTempName returned %s, has incorrect string len.\n", debugstr_w(result));
|
||||
SysFreeString(result);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue