Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
1ed4c150
Commit
1ed4c150
authored
May 26, 2019
by
Akihiro Sagawa
Committed by
Alexandre Julliard
May 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: RegLoadMUIString doesn't accept a string without '@' prefix.
Signed-off-by:
Akihiro Sagawa
<
sagawa.aki@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
90f79099
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
registry.c
dlls/advapi32/registry.c
+8
-8
registry.c
dlls/advapi32/tests/registry.c
+3
-3
No files found.
dlls/advapi32/registry.c
View file @
1ed4c150
...
...
@@ -3247,6 +3247,12 @@ LSTATUS WINAPI RegLoadMUIStringW(HKEY hKey, LPCWSTR pwszValue, LPWSTR pwszBuffer
result
=
RegQueryValueExW
(
hKey
,
pwszValue
,
NULL
,
&
dwValueType
,
(
LPBYTE
)
pwszTempBuffer
,
&
cbData
);
if
(
result
!=
ERROR_SUCCESS
)
goto
cleanup
;
/* '@' is the prefix for resource based string entries. */
if
(
*
pwszTempBuffer
!=
'@'
)
{
result
=
ERROR_INVALID_DATA
;
goto
cleanup
;
}
/* Expand environment variables, if appropriate, or copy the original string over. */
if
(
dwValueType
==
REG_EXPAND_SZ
)
{
cbData
=
ExpandEnvironmentStringsW
(
pwszTempBuffer
,
NULL
,
0
)
*
sizeof
(
WCHAR
);
...
...
@@ -3262,14 +3268,8 @@ LSTATUS WINAPI RegLoadMUIStringW(HKEY hKey, LPCWSTR pwszValue, LPWSTR pwszBuffer
memcpy
(
pwszExpandedBuffer
,
pwszTempBuffer
,
cbData
);
}
/* If the value references a resource based string, parse the value and load the string.
* Else just copy over the original value. */
result
=
ERROR_SUCCESS
;
if
(
*
pwszExpandedBuffer
!=
'@'
)
{
/* '@' is the prefix for resource based string entries. */
lstrcpynW
(
pwszBuffer
,
pwszExpandedBuffer
,
cbBuffer
/
sizeof
(
WCHAR
));
if
(
pcbData
)
*
pcbData
=
(
strlenW
(
pwszExpandedBuffer
)
+
1
)
*
sizeof
(
WCHAR
);
}
else
{
/* Parse the value and load the string. */
{
WCHAR
*
pComma
=
strrchrW
(
pwszExpandedBuffer
,
','
),
*
pNewBuffer
;
const
WCHAR
backslashW
[]
=
{
'\\'
,
0
};
UINT
uiStringId
;
...
...
dlls/advapi32/tests/registry.c
View file @
1ed4c150
...
...
@@ -3857,14 +3857,14 @@ static void test_RegLoadMUIString(void)
BOOL
todo
;
}
test_case
[]
=
{
/* 0 */
{
""
,
REG_SZ
,
FALSE
,
ERROR_INVALID_DATA
,
0
,
TRUE
},
{
"not a MUI string"
,
REG_SZ
,
FALSE
,
ERROR_INVALID_DATA
,
0
,
TRUE
},
{
""
,
REG_SZ
,
FALSE
,
ERROR_INVALID_DATA
},
{
"not a MUI string"
,
REG_SZ
,
FALSE
,
ERROR_INVALID_DATA
},
{
"@unknown.dll"
,
REG_SZ
,
TRUE
,
ERROR_INVALID_DATA
,
0
,
TRUE
},
{
"@unknown.dll,-10"
,
REG_SZ
,
TRUE
,
ERROR_FILE_NOT_FOUND
},
/* 4 */
{
with_env_var
,
REG_SZ
,
FALSE
,
ERROR_SUCCESS
,
0
,
TRUE
},
{
with_env_var
,
REG_EXPAND_SZ
,
FALSE
,
ERROR_SUCCESS
},
{
"%WineMuiTest1%"
,
REG_EXPAND_SZ
,
TRUE
,
ERROR_INVALID_DATA
,
0
,
TRUE
},
{
"%WineMuiTest1%"
,
REG_EXPAND_SZ
,
TRUE
,
ERROR_INVALID_DATA
},
{
"@%WineMuiTest2%"
,
REG_EXPAND_SZ
,
TRUE
,
ERROR_SUCCESS
},
/* 8 */
{
"@%WineMuiExe%,a"
,
REG_SZ
,
FALSE
,
ERROR_INVALID_DATA
,
0
,
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