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
2d5ecbee
Commit
2d5ecbee
authored
Sep 02, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: NtReadFile should fail for overlapped IO on files if offset is NULL.
parent
d37fac05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
13 deletions
+22
-13
file.c
dlls/ntdll/file.c
+22
-13
No files found.
dlls/ntdll/file.c
View file @
2d5ecbee
...
...
@@ -604,24 +604,33 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
goto
done
;
}
if
(
type
==
FD_TYPE_FILE
&&
offset
&&
offset
->
QuadPart
!=
(
LONGLONG
)
-
2
/* FILE_USE_FILE_POINTER_POSITION */
)
if
(
type
==
FD_TYPE_FILE
)
{
/* async I/O doesn't make sense on regular files */
while
((
result
=
pread
(
unix_handle
,
buffer
,
length
,
offset
->
QuadPart
))
==
-
1
)
if
(
!
(
options
&
(
FILE_SYNCHRONOUS_IO_ALERT
|
FILE_SYNCHRONOUS_IO_NONALERT
))
&&
!
offset
)
{
if
(
errno
!=
EINTR
)
status
=
STATUS_INVALID_PARAMETER
;
goto
done
;
}
if
(
offset
&&
offset
->
QuadPart
!=
(
LONGLONG
)
-
2
/* FILE_USE_FILE_POINTER_POSITION */
)
{
/* async I/O doesn't make sense on regular files */
while
((
result
=
pread
(
unix_handle
,
buffer
,
length
,
offset
->
QuadPart
))
==
-
1
)
{
status
=
FILE_GetNtStatus
();
goto
done
;
if
(
errno
!=
EINTR
)
{
status
=
FILE_GetNtStatus
();
goto
done
;
}
}
}
if
(
options
&
(
FILE_SYNCHRONOUS_IO_ALERT
|
FILE_SYNCHRONOUS_IO_NONALERT
))
/* update file pointer position */
lseek
(
unix_handle
,
offset
->
QuadPart
+
result
,
SEEK_SET
);
if
(
options
&
(
FILE_SYNCHRONOUS_IO_ALERT
|
FILE_SYNCHRONOUS_IO_NONALERT
))
/* update file pointer position */
lseek
(
unix_handle
,
offset
->
QuadPart
+
result
,
SEEK_SET
);
total
=
result
;
status
=
total
?
STATUS_SUCCESS
:
STATUS_END_OF_FILE
;
goto
done
;
total
=
result
;
status
=
total
?
STATUS_SUCCESS
:
STATUS_END_OF_FILE
;
goto
done
;
}
}
for
(;;)
...
...
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