Commit 615d09f2 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

advpack: Fix the full path check.

parent 1f3f88bf
...@@ -221,7 +221,7 @@ static BOOL is_full_path(LPWSTR path) ...@@ -221,7 +221,7 @@ static BOOL is_full_path(LPWSTR path)
if (!path || lstrlenW(path) < MIN_PATH_LEN) if (!path || lstrlenW(path) < MIN_PATH_LEN)
return FALSE; return FALSE;
if (path[1] == ':' || (path[0] == '\\' && path[1] == '\\')) if ((path[1] == ':' && path[2] == '\\') || (path[0] == '\\' && path[1] == '\\'))
return TRUE; return TRUE;
return FALSE; return FALSE;
......
...@@ -226,6 +226,23 @@ static void test_LaunchINFSection() ...@@ -226,6 +226,23 @@ static void test_LaunchINFSection()
DeleteFileA("test.inf"); DeleteFileA("test.inf");
} }
static void test_LaunchINFSectionEx()
{
HRESULT hr;
char cmdline[MAX_PATH];
create_inf_file("test.inf");
/* try an invalid CAB filename */
lstrcpy(cmdline, CURR_DIR);
lstrcpy(cmdline, "\\");
lstrcpy(cmdline, "test.inf,DefaultInstall,c:imacab.cab,4");
hr = pLaunchINFSectionEx(NULL, NULL, cmdline, 0);
ok(hr == 0, "Expected 0, got %d\n", hr);
DeleteFileA("test.inf");
}
START_TEST(install) START_TEST(install)
{ {
if (!init_function_pointers()) if (!init_function_pointers())
...@@ -235,4 +252,5 @@ START_TEST(install) ...@@ -235,4 +252,5 @@ START_TEST(install)
test_RunSetupCommand(); test_RunSetupCommand();
test_LaunchINFSection(); test_LaunchINFSection();
test_LaunchINFSectionEx();
} }
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