Commit 510ed24f authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

ole32: Cope with double quotes in paths for libraries to be loaded from the registry.

parent f3560ece
......@@ -828,6 +828,16 @@ static DWORD COM_RegReadPath(HKEY hkeyroot, const WCHAR *keyname, const WCHAR *v
if (keytype == REG_EXPAND_SZ) {
if (dstlen <= ExpandEnvironmentStringsW(src, dst, dstlen)) ret = ERROR_MORE_DATA;
} else {
const WCHAR *quote_start;
quote_start = strchrW(src, '\"');
if (quote_start) {
const WCHAR *quote_end = strchrW(quote_start + 1, '\"');
if (quote_end) {
memmove(src, quote_start + 1,
(quote_end - quote_start - 1) * sizeof(WCHAR));
src[quote_end - quote_start - 1] = '\0';
}
}
lstrcpynW(dst, src, dstlen);
}
}
......
......@@ -2293,7 +2293,7 @@ static void reg_unreg_wine_test_class(BOOL Register)
{
error = RegCreateKeyEx(HKEY_CLASSES_ROOT, buffer, 0, NULL, 0, KEY_SET_VALUE, NULL, &hkey, &dwDisposition);
ok(error == ERROR_SUCCESS, "RegCreateKeyEx failed with error %d\n", error);
error = RegSetValueEx(hkey, NULL, 0, REG_SZ, (const unsigned char *)"ole32.dll", strlen("ole32.dll") + 1);
error = RegSetValueEx(hkey, NULL, 0, REG_SZ, (const unsigned char *)"\"ole32.dll\" \"a\"", strlen("\"ole32.dll\" \"a\"") + 1);
ok(error == ERROR_SUCCESS, "RegSetValueEx failed with error %d\n", error);
RegCloseKey(hkey);
}
......
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