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
d76f5b4a
Commit
d76f5b4a
authored
Sep 12, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Use the correct length for kernel object names in object attributes.
parent
a5463c88
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
sysparams.c
dlls/win32u/sysparams.c
+2
-1
winstation.c
dlls/win32u/winstation.c
+2
-1
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+2
-1
No files found.
dlls/win32u/sysparams.c
View file @
d76f5b4a
...
...
@@ -450,7 +450,8 @@ static HANDLE get_display_device_init_mutex( void )
snprintf
(
buffer
,
ARRAY_SIZE
(
buffer
),
"
\\
Sessions
\\
%u
\\
BaseNamedObjects
\\
display_device_init"
,
(
int
)
NtCurrentTeb
()
->
Peb
->
SessionId
);
name
.
Length
=
name
.
MaximumLength
=
asciiz_to_unicode
(
bufferW
,
buffer
);
name
.
MaximumLength
=
asciiz_to_unicode
(
bufferW
,
buffer
);
name
.
Length
=
name
.
MaximumLength
-
sizeof
(
WCHAR
);
InitializeObjectAttributes
(
&
attr
,
&
name
,
OBJ_OPENIF
,
NULL
,
NULL
);
if
(
NtCreateMutant
(
&
mutex
,
MUTEX_ALL_ACCESS
,
&
attr
,
FALSE
)
<
0
)
return
0
;
...
...
dlls/win32u/winstation.c
View file @
d76f5b4a
...
...
@@ -554,7 +554,8 @@ static HANDLE get_winstations_dir_handle(void)
sprintf
(
bufferA
,
"
\\
Sessions
\\
%u
\\
Windows
\\
WindowStations"
,
(
int
)
NtCurrentTeb
()
->
Peb
->
SessionId
);
str
.
Buffer
=
buffer
;
str
.
Length
=
str
.
MaximumLength
=
asciiz_to_unicode
(
buffer
,
bufferA
)
-
sizeof
(
WCHAR
);
str
.
MaximumLength
=
asciiz_to_unicode
(
buffer
,
bufferA
);
str
.
Length
=
str
.
MaximumLength
-
sizeof
(
WCHAR
);
InitializeObjectAttributes
(
&
attr
,
&
str
,
0
,
0
,
NULL
);
status
=
NtOpenDirectoryObject
(
&
dir
,
DIRECTORY_CREATE_OBJECT
|
DIRECTORY_TRAVERSE
,
&
attr
);
return
status
?
0
:
dir
;
...
...
dlls/winex11.drv/x11drv_main.c
View file @
d76f5b4a
...
...
@@ -1008,7 +1008,8 @@ static HANDLE get_display_device_init_mutex(void)
snprintf
(
buffer
,
ARRAY_SIZE
(
buffer
),
"
\\
Sessions
\\
%u
\\
BaseNamedObjects
\\
display_device_init"
,
(
int
)
NtCurrentTeb
()
->
Peb
->
SessionId
);
name
.
Length
=
name
.
MaximumLength
=
asciiz_to_unicode
(
bufferW
,
buffer
);
name
.
MaximumLength
=
asciiz_to_unicode
(
bufferW
,
buffer
);
name
.
Length
=
name
.
MaximumLength
-
sizeof
(
WCHAR
);
InitializeObjectAttributes
(
&
attr
,
&
name
,
OBJ_OPENIF
,
NULL
,
NULL
);
if
(
NtCreateMutant
(
&
mutex
,
MUTEX_ALL_ACCESS
,
&
attr
,
FALSE
)
<
0
)
return
0
;
...
...
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