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
3c55f78f
Commit
3c55f78f
authored
Jan 12, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix handling of 64-bit sizes in NtMapViewOfSection.
parent
4cbe867a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
virtual.c
dlls/ntdll/virtual.c
+9
-9
No files found.
dlls/ntdll/virtual.c
View file @
3c55f78f
...
...
@@ -1874,6 +1874,10 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
SERVER_END_REQ
;
if
(
res
)
return
res
;
size
=
((
ULONGLONG
)
size_high
<<
32
)
|
size_low
;
if
(
sizeof
(
size
)
==
sizeof
(
size_low
)
&&
size_high
)
ERR
(
"Sizes larger than 4Gb (%x%08x) not supported on this platform
\n
"
,
size_high
,
size_low
);
if
((
res
=
server_get_unix_fd
(
handle
,
0
,
&
unix_handle
,
&
needs_close
,
NULL
,
NULL
)))
goto
done
;
if
(
prot
&
VPROT_IMAGE
)
...
...
@@ -1884,32 +1888,28 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
if
((
res
=
server_get_unix_fd
(
shared_file
,
FILE_READ_DATA
|
FILE_WRITE_DATA
,
&
shared_fd
,
&
shared_needs_close
,
NULL
,
NULL
)))
goto
done
;
res
=
map_image
(
handle
,
unix_handle
,
base
,
size
_low
,
mask
,
header_size
,
res
=
map_image
(
handle
,
unix_handle
,
base
,
size
,
mask
,
header_size
,
shared_fd
,
dup_mapping
,
addr_ptr
);
if
(
shared_needs_close
)
close
(
shared_fd
);
NtClose
(
shared_file
);
}
else
{
res
=
map_image
(
handle
,
unix_handle
,
base
,
size
_low
,
mask
,
header_size
,
res
=
map_image
(
handle
,
unix_handle
,
base
,
size
,
mask
,
header_size
,
-
1
,
dup_mapping
,
addr_ptr
);
}
if
(
needs_close
)
close
(
unix_handle
);
if
(
!
res
)
*
size_ptr
=
size
_low
;
if
(
!
res
)
*
size_ptr
=
size
;
return
res
;
}
if
(
size_high
)
ERR
(
"Sizes larger than 4Gb not supported
\n
"
);
if
((
offset
.
u
.
LowPart
>=
size_low
)
||
(
*
size_ptr
>
size_low
-
offset
.
u
.
LowPart
))
if
((
offset
.
QuadPart
>=
size
)
||
(
*
size_ptr
>
size
-
offset
.
QuadPart
))
{
res
=
STATUS_INVALID_PARAMETER
;
goto
done
;
}
if
(
*
size_ptr
)
size
=
ROUND_SIZE
(
offset
.
u
.
LowPart
,
*
size_ptr
);
else
size
=
size
_low
-
offset
.
u
.
Low
Part
;
else
size
=
size
-
offset
.
Quad
Part
;
switch
(
protect
)
{
...
...
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