msi: Return INSTALLSTATE_BADCONFIG if we can't decode the first component.
This commit is contained in:
parent
73e0a87477
commit
34f6af95b4
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue