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
b652dcee
Commit
b652dcee
authored
Jun 20, 2012
by
Marcus Meissner
Committed by
Alexandre Julliard
Jun 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Fixed read overflow in WriteFile argument.
parent
0833a639
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
pipe.c
dlls/kernel32/tests/pipe.c
+5
-5
No files found.
dlls/kernel32/tests/pipe.c
View file @
b652dcee
...
...
@@ -1758,7 +1758,7 @@ static void test_readfileex_pending(void)
OVERLAPPED
overlapped
;
char
read_buf
[
1024
];
char
write_buf
[
1024
];
const
char
*
test_string
=
"test"
;
const
char
test_string
[]
=
"test"
;
int
i
;
server
=
CreateNamedPipe
(
PIPENAME
,
FILE_FLAG_OVERLAPPED
|
PIPE_ACCESS_DUPLEX
,
...
...
@@ -1798,9 +1798,9 @@ static void test_readfileex_pending(void)
ok
(
ret
==
TRUE
,
"ReadFileEx failed, err=%i
\n
"
,
GetLastError
());
ok
(
completion_called
==
0
,
"completion routine called before ReadFileEx returned
\n
"
);
ret
=
WriteFile
(
client
,
test_string
,
s
izeof
(
test_string
),
&
num_bytes
,
NULL
);
ret
=
WriteFile
(
client
,
test_string
,
s
trlen
(
test_string
),
&
num_bytes
,
NULL
);
ok
(
ret
==
TRUE
,
"WriteFile failed
\n
"
);
ok
(
num_bytes
==
s
izeof
(
test_string
),
"only %i bytes written
\n
"
,
num_bytes
);
ok
(
num_bytes
==
s
trlen
(
test_string
),
"only %i bytes written
\n
"
,
num_bytes
);
ok
(
completion_called
==
0
,
"completion routine called during WriteFile
\n
"
);
...
...
@@ -1809,9 +1809,9 @@ static void test_readfileex_pending(void)
ok
(
completion_called
==
1
,
"completion not called after writing pipe
\n
"
);
ok
(
completion_errorcode
==
0
,
"completion called with error %x
\n
"
,
completion_errorcode
);
ok
(
completion_num_bytes
==
s
izeof
(
test_string
),
"ReadFileEx returned only %d bytes
\n
"
,
completion_num_bytes
);
ok
(
completion_num_bytes
==
s
trlen
(
test_string
),
"ReadFileEx returned only %d bytes
\n
"
,
completion_num_bytes
);
ok
(
completion_lpoverlapped
==
&
overlapped
,
"completion called with wrong overlapped pointer
\n
"
);
ok
(
!
memcmp
(
test_string
,
read_buf
,
s
izeof
(
test_string
)),
"ReadFileEx read wrong bytes
\n
"
);
ok
(
!
memcmp
(
test_string
,
read_buf
,
s
trlen
(
test_string
)),
"ReadFileEx read wrong bytes
\n
"
);
/* Make writes until the pipe is full and the write fails */
memset
(
write_buf
,
0xaa
,
sizeof
(
write_buf
));
...
...
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