msi [12/13]: Return INSTALLSTATE_BADCONFIG if we can't decode the
first component
James Hawkins
truiken at gmail.com
Mon Jul 2 22:23:58 CDT 2007
Hi,
Changelog:
* 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(-)
--
James Hawkins
-------------- next part --------------
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 MsiQueryFeatureState
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 f847bd9..14dda8a 100644
--- a/dlls/msi/tests/msi.c
+++ b/dlls/msi/tests/msi.c
@@ -591,10 +591,7 @@ static void test_MsiQueryFeatureState(vo
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);
--
1.4.1
More information about the wine-patches
mailing list