Commit 367c2048 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Don't crash on null last parameter in MsiDecomposeDescriptor.

parent d0856c0a
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment