James Hawkins : msi: Leave room for the NULL terminator.
Alexandre Julliard
julliard at winehq.org
Tue Feb 5 06:34:12 CST 2008
Module: wine
Branch: master
Commit: 40841946f586962b56dbdfdfa8ab5bfa754737d3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=40841946f586962b56dbdfdfa8ab5bfa754737d3
Author: James Hawkins <truiken at gmail.com>
Date: Mon Feb 4 11:36:37 2008 -0600
msi: Leave room for the NULL terminator.
---
dlls/msi/msi.c | 4 ++--
dlls/msi/tests/msi.c | 14 ++++----------
2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index a5b9d10..593a46f 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -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);
diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c
index cc2adb5..4cc193d 100644
--- a/dlls/msi/tests/msi.c
+++ b/dlls/msi/tests/msi.c
@@ -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;
More information about the wine-cvs
mailing list