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
5bfa5f1e
Commit
5bfa5f1e
authored
Jan 17, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe/tests: Fix path buffer allocation size.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
999ef32a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
ntoskrnl.c
dlls/ntoskrnl.exe/tests/ntoskrnl.c
+5
-4
No files found.
dlls/ntoskrnl.exe/tests/ntoskrnl.c
View file @
5bfa5f1e
...
...
@@ -144,7 +144,7 @@ static void main_test(void)
WCHAR
temppathW
[
MAX_PATH
],
pathW
[
MAX_PATH
];
struct
test_input
*
test_input
;
UNICODE_STRING
pathU
;
DWORD
written
,
read
;
DWORD
len
,
written
,
read
;
LONG
new_failures
;
char
buffer
[
512
];
HANDLE
okfile
;
...
...
@@ -155,13 +155,14 @@ static void main_test(void)
GetTempFileNameW
(
temppathW
,
dokW
,
0
,
pathW
);
pRtlDosPathNameToNtPathName_U
(
pathW
,
&
pathU
,
NULL
,
NULL
);
test_input
=
heap_alloc
(
offsetof
(
struct
test_input
,
path
[
pathU
.
Length
/
sizeof
(
WCHAR
)])
);
len
=
pathU
.
Length
+
sizeof
(
WCHAR
);
test_input
=
heap_alloc
(
offsetof
(
struct
test_input
,
path
[
len
/
sizeof
(
WCHAR
)])
);
test_input
->
running_under_wine
=
!
strcmp
(
winetest_platform
,
"wine"
);
test_input
->
winetest_report_success
=
winetest_report_success
;
test_input
->
winetest_debug
=
winetest_debug
;
memcpy
(
test_input
->
path
,
pathU
.
Buffer
,
pathU
.
Length
+
sizeof
(
WCHAR
)
);
memcpy
(
test_input
->
path
,
pathU
.
Buffer
,
len
);
res
=
DeviceIoControl
(
device
,
IOCTL_WINETEST_MAIN_TEST
,
test_input
,
offsetof
(
struct
test_input
,
path
[
pathU
.
Length
/
sizeof
(
WCHAR
)]),
offsetof
(
struct
test_input
,
path
[
len
/
sizeof
(
WCHAR
)]),
&
new_failures
,
sizeof
(
new_failures
),
&
written
,
NULL
);
ok
(
res
,
"DeviceIoControl failed: %u
\n
"
,
GetLastError
());
ok
(
written
==
sizeof
(
new_failures
),
"got size %x
\n
"
,
written
);
...
...
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