James Hawkins : msi: Return INSTALLSTATE_BADCONFIG if we can'
t decode the first component.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jul 3 08:01:36 CDT 2007
Module: wine
Branch: master
Commit: 34f6af95b4cafc25f06a1ca85c6eb555c34966b5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=34f6af95b4cafc25f06a1ca85c6eb555c34966b5
Author: James Hawkins <truiken at gmail.com>
Date: Mon Jul 2 20:23:58 2007 -0700
msi: Return INSTALLSTATE_BADCONFIG if we can't decode the first component.
---
dlls/msi/msi.c | 10 +++++++---
dlls/msi/tests/msi.c | 5 +----
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index 6d69cf9..b352595 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -1272,13 +1272,17 @@ INSTALLSTATE WINAPI MsiQueryFeatureStateW(LPCWSTR szProduct, LPCWSTR szFeature)
if (!components)
return INSTALLSTATE_ADVERTISED;
- for( p = components; *p != 2 ; p += 20)
+ for( p = components; *p && *p != 2 ; p += 20)
{
if (!decode_base85_guid( p, &guid ))
{
- ERR("%s\n", debugstr_w(p));
- break;
+ if (p != components)
+ break;
+
+ msi_free(components);
+ return INSTALLSTATE_BADCONFIG;
}
+
StringFromGUID2(&guid, comp, GUID_SIZE);
r = MsiGetComponentPathW(szProduct, comp, NULL, 0);
TRACE("component %s state %d\n", debugstr_guid(&guid), r);
diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c
index 589b161..7814571 100644
--- a/dlls/msi/tests/msi.c
+++ b/dlls/msi/tests/msi.c
@@ -591,10 +591,7 @@ static void test_MsiQueryFeatureState(void)
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
state = MsiQueryFeatureStateA(prodcode, "feature");
- todo_wine
- {
- ok(state == INSTALLSTATE_BADCONFIG, "Expected INSTALLSTATE_BADCONFIG, got %d\n", state);
- }
+ ok(state == INSTALLSTATE_BADCONFIG, "Expected INSTALLSTATE_BADCONFIG, got %d\n", state);
res = RegSetValueExA(localkey, "feature", 0, REG_SZ, (const BYTE *)"aaaaaaaaaaaaaaaaaaaa", 21);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
More information about the wine-cvs
mailing list