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
32cc4011
Commit
32cc4011
authored
Jan 22, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Make GetOverlappedResult crash on NULL args as native does.
parent
8b195913
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
file.c
dlls/kernel32/file.c
+1
-7
file.c
dlls/kernel32/tests/file.c
+6
-0
rpc.c
dlls/ole32/rpc.c
+2
-1
No files found.
dlls/kernel32/file.c
View file @
32cc4011
...
@@ -603,12 +603,6 @@ BOOL WINAPI GetOverlappedResult(HANDLE hFile, LPOVERLAPPED lpOverlapped,
...
@@ -603,12 +603,6 @@ BOOL WINAPI GetOverlappedResult(HANDLE hFile, LPOVERLAPPED lpOverlapped,
TRACE
(
"(%p %p %p %x)
\n
"
,
hFile
,
lpOverlapped
,
lpTransferred
,
bWait
);
TRACE
(
"(%p %p %p %x)
\n
"
,
hFile
,
lpOverlapped
,
lpTransferred
,
bWait
);
if
(
lpOverlapped
==
NULL
)
{
ERR
(
"lpOverlapped was null
\n
"
);
return
FALSE
;
}
status
=
lpOverlapped
->
Internal
;
status
=
lpOverlapped
->
Internal
;
if
(
status
==
STATUS_PENDING
)
if
(
status
==
STATUS_PENDING
)
{
{
...
@@ -624,7 +618,7 @@ BOOL WINAPI GetOverlappedResult(HANDLE hFile, LPOVERLAPPED lpOverlapped,
...
@@ -624,7 +618,7 @@ BOOL WINAPI GetOverlappedResult(HANDLE hFile, LPOVERLAPPED lpOverlapped,
status
=
lpOverlapped
->
Internal
;
status
=
lpOverlapped
->
Internal
;
}
}
if
(
lpTransferred
)
*
lpTransferred
=
lpOverlapped
->
InternalHigh
;
*
lpTransferred
=
lpOverlapped
->
InternalHigh
;
if
(
status
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
if
(
status
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
status
;
return
!
status
;
...
...
dlls/kernel32/tests/file.c
View file @
32cc4011
...
@@ -2022,6 +2022,12 @@ static void test_overlapped(void)
...
@@ -2022,6 +2022,12 @@ static void test_overlapped(void)
DWORD
r
,
result
;
DWORD
r
,
result
;
/* GetOverlappedResult crashes if the 2nd or 3rd param are NULL */
/* GetOverlappedResult crashes if the 2nd or 3rd param are NULL */
if
(
0
)
/* tested: WinXP */
{
GetOverlappedResult
(
0
,
NULL
,
&
result
,
FALSE
);
GetOverlappedResult
(
0
,
&
ov
,
NULL
,
FALSE
);
GetOverlappedResult
(
0
,
NULL
,
NULL
,
FALSE
);
}
memset
(
&
ov
,
0
,
sizeof
ov
);
memset
(
&
ov
,
0
,
sizeof
ov
);
result
=
1
;
result
=
1
;
...
...
dlls/ole32/rpc.c
View file @
32cc4011
...
@@ -1861,6 +1861,7 @@ static DWORD WINAPI local_server_thread(LPVOID param)
...
@@ -1861,6 +1861,7 @@ static DWORD WINAPI local_server_thread(LPVOID param)
BOOL
multi_use
=
lsp
->
multi_use
;
BOOL
multi_use
=
lsp
->
multi_use
;
OVERLAPPED
ovl
;
OVERLAPPED
ovl
;
HANDLE
pipe_event
;
HANDLE
pipe_event
;
DWORD
bytes
;
TRACE
(
"Starting threader for %s.
\n
"
,
debugstr_guid
(
&
lsp
->
clsid
));
TRACE
(
"Starting threader for %s.
\n
"
,
debugstr_guid
(
&
lsp
->
clsid
));
...
@@ -1929,7 +1930,7 @@ static DWORD WINAPI local_server_thread(LPVOID param)
...
@@ -1929,7 +1930,7 @@ static DWORD WINAPI local_server_thread(LPVOID param)
}
}
WriteFile
(
hPipe
,
buffer
,
buflen
,
&
res
,
&
ovl
);
WriteFile
(
hPipe
,
buffer
,
buflen
,
&
res
,
&
ovl
);
GetOverlappedResult
(
hPipe
,
&
ovl
,
NULL
,
TRUE
);
GetOverlappedResult
(
hPipe
,
&
ovl
,
&
bytes
,
TRUE
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
FlushFileBuffers
(
hPipe
);
FlushFileBuffers
(
hPipe
);
...
...
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