mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[SHELL32] CQueryAssociation: Add slash check (#6676)
Follow-up to #6656. I had forgotten to check the slash. JIRA issue: CORE-19493 Add StrChrW(pszAssoc, L'\\') check before PathFindExtensionW call.
This commit is contained in:
parent
f9a5585870
commit
72a27e6d45
1 changed files with 6 additions and 3 deletions
|
@ -98,9 +98,12 @@ HRESULT STDMETHODCALLTYPE CQueryAssociations::Init(
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
LPCWSTR pchDotExt;
|
LPCWSTR pchDotExt;
|
||||||
|
|
||||||
pchDotExt = PathFindExtensionW(pszAssoc);
|
if (StrChrW(pszAssoc, L'\\'))
|
||||||
if (pchDotExt && *pchDotExt)
|
{
|
||||||
pszAssoc = pchDotExt;
|
pchDotExt = PathFindExtensionW(pszAssoc);
|
||||||
|
if (pchDotExt && *pchDotExt)
|
||||||
|
pszAssoc = pchDotExt;
|
||||||
|
}
|
||||||
|
|
||||||
LONG ret = RegOpenKeyExW(HKEY_CLASSES_ROOT,
|
LONG ret = RegOpenKeyExW(HKEY_CLASSES_ROOT,
|
||||||
pszAssoc,
|
pszAssoc,
|
||||||
|
|
Loading…
Reference in a new issue