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

msi: Leave room for the NULL terminator.

parent d1654350
......@@ -1549,10 +1549,10 @@ UINT WINAPI MsiGetFileVersionA(LPCSTR szFilePath, LPSTR lpVersionBuf,
if( (ret == ERROR_SUCCESS || ret == ERROR_MORE_DATA) && lpwVersionBuff )
WideCharToMultiByte(CP_ACP, 0, lpwVersionBuff, -1,
lpVersionBuf, *pcchVersionBuf, NULL, NULL);
lpVersionBuf, *pcchVersionBuf + 1, NULL, NULL);
if( (ret == ERROR_SUCCESS || ret == ERROR_MORE_DATA) && lpwLangBuff )
WideCharToMultiByte(CP_ACP, 0, lpwLangBuff, -1,
lpLangBuf, *pcchLangBuf, NULL, NULL);
lpLangBuf, *pcchLangBuf + 1, NULL, NULL);
end:
msi_free(szwFilePath);
......
......@@ -1988,11 +1988,8 @@ static void test_MsiGetFileVersion(void)
ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
ok(!lstrcmpA(lang, langcheck), "Expected %s, got %s\n", langcheck, lang);
ok(langsz == langchecksz, "Expected %d, got %d\n", langchecksz, langsz);
todo_wine
{
ok(!lstrcmpA(version, vercheck),
"Expected %s, got %s\n", vercheck, version);
}
ok(!lstrcmpA(version, vercheck),
"Expected %s, got %s\n", vercheck, version);
/* only check version */
versz = MAX_PATH;
......@@ -2000,11 +1997,8 @@ static void test_MsiGetFileVersion(void)
r = MsiGetFileVersionA(path, version, &versz, NULL, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
todo_wine
{
ok(!lstrcmpA(version, vercheck),
"Expected %s, got %s\n", vercheck, version);
}
ok(!lstrcmpA(version, vercheck),
"Expected %s, got %s\n", vercheck, version);
/* only check language */
langsz = MAX_PATH;
......
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