mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 08:25:48 +00:00
* dlls/shell32/shellpath.c: Aric Stewart <aric@codeweavers.com>
Make sure that the size of the buffer passed to RegSetValueExW is in bytes not WCHARs. svn path=/trunk/; revision=10291
This commit is contained in:
parent
2fe9583bc7
commit
a646b85ed6
1 changed files with 9 additions and 6 deletions
|
@ -1101,6 +1101,7 @@ HRESULT WINAPI SHGetFolderPathW(
|
||||||
|
|
||||||
if (RegQueryValueExW(hKey,szValueName,NULL,&dwType,(LPBYTE)pszPath,&dwPathLen))
|
if (RegQueryValueExW(hKey,szValueName,NULL,&dwType,(LPBYTE)pszPath,&dwPathLen))
|
||||||
{
|
{
|
||||||
|
|
||||||
/* value not existing */
|
/* value not existing */
|
||||||
if (dwCsidlFlags & CSIDL_MYFLAG_RELATIVE)
|
if (dwCsidlFlags & CSIDL_MYFLAG_RELATIVE)
|
||||||
{
|
{
|
||||||
|
@ -1114,7 +1115,8 @@ HRESULT WINAPI SHGetFolderPathW(
|
||||||
strcpyW(pszPath + 3, szDefaultPath);
|
strcpyW(pszPath + 3, szDefaultPath);
|
||||||
}
|
}
|
||||||
dwType=REG_SZ;
|
dwType=REG_SZ;
|
||||||
RegSetValueExW(hKey,szValueName,0,REG_SZ,(LPBYTE)pszPath,strlenW(pszPath)+1);
|
RegSetValueExW(hKey,szValueName,0,REG_SZ,(LPBYTE)pszPath,
|
||||||
|
(strlenW(pszPath)+1)*sizeof(WCHAR));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
|
@ -1150,7 +1152,8 @@ HRESULT WINAPI SHGetFolderPathW(
|
||||||
strcpyW(pszPath + 3, szDefaultPath);
|
strcpyW(pszPath + 3, szDefaultPath);
|
||||||
}
|
}
|
||||||
dwType=REG_SZ;
|
dwType=REG_SZ;
|
||||||
RegSetValueExW(hKey,szValueName,0,REG_SZ,(LPBYTE)pszPath,strlenW(pszPath)+1);
|
RegSetValueExW(hKey,szValueName,0,REG_SZ,(LPBYTE)pszPath,
|
||||||
|
(strlenW(pszPath)+1)*sizeof(WCHAR));
|
||||||
}
|
}
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
|
@ -1322,14 +1325,14 @@ HRESULT WINAPI SHGetSpecialFolderLocation(
|
||||||
*ppidl = _ILCreateControlPanel();
|
*ppidl = _ILCreateControlPanel();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CSIDL_FONTS:
|
|
||||||
FIXME("virtual font folder");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CSIDL_PRINTERS:
|
case CSIDL_PRINTERS:
|
||||||
*ppidl = _ILCreatePrinters();
|
*ppidl = _ILCreatePrinters();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CSIDL_FONTS:
|
||||||
|
FIXME("virtual font folder");
|
||||||
|
break;
|
||||||
|
|
||||||
case CSIDL_BITBUCKET:
|
case CSIDL_BITBUCKET:
|
||||||
*ppidl = _ILCreateBitBucket();
|
*ppidl = _ILCreateBitBucket();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue