msi: Don't crash on null last parameter in MsiDecomposeDescriptor.
This commit is contained in:
parent
d0856c0ac5
commit
367c2048a1
|
@ -1156,7 +1156,7 @@ UINT WINAPI MsiDecomposeDescriptorW( LPCWSTR szDescriptor, LPWSTR szProduct,
|
|||
len = ( &p[21] - szDescriptor );
|
||||
|
||||
TRACE("length = %d\n", len);
|
||||
*pUsed = len;
|
||||
if (pUsed) *pUsed = len;
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -479,6 +479,9 @@ static void test_msidecomposedesc(void)
|
|||
r = pMsiDecomposeDescriptorA(NULL, NULL, NULL, NULL, &len);
|
||||
ok(r == ERROR_INVALID_PARAMETER, "returned wrong error\n");
|
||||
ok(len == 0, "length wrong\n");
|
||||
|
||||
r = pMsiDecomposeDescriptorA(desc, NULL, NULL, NULL, NULL);
|
||||
ok(r == ERROR_SUCCESS, "returned wrong error\n");
|
||||
}
|
||||
|
||||
static UINT try_query_param( MSIHANDLE hdb, LPCSTR szQuery, MSIHANDLE hrec )
|
||||
|
|
Loading…
Reference in New Issue