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
956005d3
Commit
956005d3
authored
Feb 14, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Feb 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
krnl386: Avoid calling RtlInitUnicodeString on a static constant.
parent
72b86f96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
18 deletions
+10
-18
relay.c
dlls/krnl386.exe16/relay.c
+10
-18
No files found.
dlls/krnl386.exe16/relay.c
View file @
956005d3
...
...
@@ -85,27 +85,23 @@ static const char **build_list( const WCHAR *buffer )
void
RELAY16_InitDebugLists
(
void
)
{
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
name
;
char
buffer
[
1024
];
HANDLE
root
,
hkey
;
DWORD
count
;
WCHAR
*
str
;
static
const
WCHAR
configW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'D'
,
'e'
,
'b'
,
'u'
,
'g'
,
0
};
static
const
WCHAR
RelayIncludeW
[]
=
{
'R'
,
'e'
,
'l'
,
'a'
,
'y'
,
'I'
,
'n'
,
'c'
,
'l'
,
'u'
,
'd'
,
'e'
,
0
};
static
const
WCHAR
RelayExcludeW
[]
=
{
'R'
,
'e'
,
'l'
,
'a'
,
'y'
,
'E'
,
'x'
,
'c'
,
'l'
,
'u'
,
'd'
,
'e'
,
0
};
static
const
WCHAR
SnoopIncludeW
[]
=
{
'S'
,
'n'
,
'o'
,
'o'
,
'p'
,
'I'
,
'n'
,
'c'
,
'l'
,
'u'
,
'd'
,
'e'
,
0
};
static
const
WCHAR
SnoopExcludeW
[]
=
{
'S'
,
'n'
,
'o'
,
'o'
,
'p'
,
'E'
,
'x'
,
'c'
,
'l'
,
'u'
,
'd'
,
'e'
,
0
};
UNICODE_STRING
config
=
RTL_CONSTANT_STRING
(
L"Software
\\
Wine
\\
Debug"
);
UNICODE_STRING
relay_include
=
RTL_CONSTANT_STRING
(
L"RelayInclude"
);
UNICODE_STRING
relay_exclude
=
RTL_CONSTANT_STRING
(
L"RelayExclude"
);
UNICODE_STRING
snoop_include
=
RTL_CONSTANT_STRING
(
L"SnoopInclude"
);
UNICODE_STRING
snoop_exclude
=
RTL_CONSTANT_STRING
(
L"SnoopExclude"
);
RtlOpenCurrentUser
(
KEY_READ
,
&
root
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
root
;
attr
.
ObjectName
=
&
name
;
attr
.
ObjectName
=
&
config
;
attr
.
Attributes
=
0
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
RtlInitUnicodeString
(
&
name
,
configW
);
/* @@ Wine registry key: HKCU\Software\Wine\Debug */
if
(
NtOpenKey
(
&
hkey
,
KEY_READ
,
&
attr
))
hkey
=
0
;
...
...
@@ -113,26 +109,22 @@ void RELAY16_InitDebugLists(void)
if
(
!
hkey
)
return
;
str
=
(
WCHAR
*
)((
KEY_VALUE_PARTIAL_INFORMATION
*
)
buffer
)
->
Data
;
RtlInitUnicodeString
(
&
name
,
RelayIncludeW
);
if
(
!
NtQueryValueKey
(
hkey
,
&
name
,
KeyValuePartialInformation
,
buffer
,
sizeof
(
buffer
),
&
count
))
if
(
!
NtQueryValueKey
(
hkey
,
&
relay_include
,
KeyValuePartialInformation
,
buffer
,
sizeof
(
buffer
),
&
count
))
{
debug_relay_includelist
=
build_list
(
str
);
}
RtlInitUnicodeString
(
&
name
,
RelayExcludeW
);
if
(
!
NtQueryValueKey
(
hkey
,
&
name
,
KeyValuePartialInformation
,
buffer
,
sizeof
(
buffer
),
&
count
))
if
(
!
NtQueryValueKey
(
hkey
,
&
relay_exclude
,
KeyValuePartialInformation
,
buffer
,
sizeof
(
buffer
),
&
count
))
{
debug_relay_excludelist
=
build_list
(
str
);
}
RtlInitUnicodeString
(
&
name
,
SnoopIncludeW
);
if
(
!
NtQueryValueKey
(
hkey
,
&
name
,
KeyValuePartialInformation
,
buffer
,
sizeof
(
buffer
),
&
count
))
if
(
!
NtQueryValueKey
(
hkey
,
&
snoop_include
,
KeyValuePartialInformation
,
buffer
,
sizeof
(
buffer
),
&
count
))
{
debug_snoop_includelist
=
build_list
(
str
);
}
RtlInitUnicodeString
(
&
name
,
SnoopExcludeW
);
if
(
!
NtQueryValueKey
(
hkey
,
&
name
,
KeyValuePartialInformation
,
buffer
,
sizeof
(
buffer
),
&
count
))
if
(
!
NtQueryValueKey
(
hkey
,
&
snoop_exclude
,
KeyValuePartialInformation
,
buffer
,
sizeof
(
buffer
),
&
count
))
{
debug_snoop_excludelist
=
build_list
(
str
);
}
...
...
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