[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:
Katayama Hirofumi MZ 2024-03-27 17:36:48 +09:00 committed by GitHub
parent f9a5585870
commit 72a27e6d45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -98,9 +98,12 @@ HRESULT STDMETHODCALLTYPE CQueryAssociations::Init(
HRESULT hr; HRESULT hr;
LPCWSTR pchDotExt; LPCWSTR pchDotExt;
if (StrChrW(pszAssoc, L'\\'))
{
pchDotExt = PathFindExtensionW(pszAssoc); pchDotExt = PathFindExtensionW(pszAssoc);
if (pchDotExt && *pchDotExt) if (pchDotExt && *pchDotExt)
pszAssoc = pchDotExt; pszAssoc = pchDotExt;
}
LONG ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, LONG ret = RegOpenKeyExW(HKEY_CLASSES_ROOT,
pszAssoc, pszAssoc,