Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
32584bb5
Commit
32584bb5
authored
Oct 19, 2021
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Oct 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Pass size in bytes to RegLoadMUIStringW() and RegQueryValueExW().
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
17e201b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
classes.c
dlls/shell32/classes.c
+7
-7
No files found.
dlls/shell32/classes.c
View file @
32584bb5
...
...
@@ -212,11 +212,11 @@ static BOOL HCR_RegOpenClassIDKey(REFIID riid, HKEY *hkey)
static
BOOL
HCR_RegGetDefaultIconW
(
HKEY
hkey
,
LPWSTR
szDest
,
DWORD
len
,
int
*
picon_idx
)
{
DWORD
dwType
;
DWORD
dwType
,
size
=
len
*
sizeof
(
WCHAR
)
;
WCHAR
sTemp
[
MAX_PATH
];
WCHAR
sNum
[
5
];
if
(
!
RegQueryValueExW
(
hkey
,
NULL
,
0
,
&
dwType
,
(
LPBYTE
)
szDest
,
&
len
))
if
(
!
RegQueryValueExW
(
hkey
,
NULL
,
0
,
&
dwType
,
(
LPBYTE
)
szDest
,
&
size
))
{
if
(
dwType
==
REG_EXPAND_SZ
)
{
...
...
@@ -316,13 +316,13 @@ BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len)
{
HKEY
hkey
;
BOOL
ret
=
FALSE
;
DWORD
buflen
=
len
;
DWORD
buflen
=
len
*
sizeof
(
WCHAR
)
;
szDest
[
0
]
=
0
;
if
(
HCR_RegOpenClassIDKey
(
riid
,
&
hkey
))
{
if
(
!
RegLoadMUIStringW
(
hkey
,
L"LocalizedString"
,
szDest
,
len
,
NULL
,
0
,
NULL
)
||
!
RegQueryValueExW
(
hkey
,
L""
,
0
,
NULL
,
(
LPBYTE
)
szDest
,
&
len
))
if
(
!
RegLoadMUIStringW
(
hkey
,
L"LocalizedString"
,
szDest
,
buf
len
,
NULL
,
0
,
NULL
)
||
!
RegQueryValueExW
(
hkey
,
L""
,
0
,
NULL
,
(
LPBYTE
)
szDest
,
&
buf
len
))
{
ret
=
TRUE
;
}
...
...
@@ -333,12 +333,12 @@ BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len)
{
if
(
IsEqualIID
(
riid
,
&
CLSID_ShellDesktop
))
{
if
(
LoadStringW
(
shell32_hInstance
,
IDS_DESKTOP
,
szDest
,
buf
len
))
if
(
LoadStringW
(
shell32_hInstance
,
IDS_DESKTOP
,
szDest
,
len
))
ret
=
TRUE
;
}
else
if
(
IsEqualIID
(
riid
,
&
CLSID_MyComputer
))
{
if
(
LoadStringW
(
shell32_hInstance
,
IDS_MYCOMPUTER
,
szDest
,
buf
len
))
if
(
LoadStringW
(
shell32_hInstance
,
IDS_MYCOMPUTER
,
szDest
,
len
))
ret
=
TRUE
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment