Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
1c99af4a
Commit
1c99af4a
authored
Dec 03, 2000
by
Andreas Mohr
Committed by
Alexandre Julliard
Dec 03, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check the attributes of the *current* section, not only the attributes
of the *first* section...
parent
9e1fda18
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
mapping.c
server/mapping.c
+10
-3
No files found.
server/mapping.c
View file @
1c99af4a
...
@@ -95,6 +95,7 @@ static int build_shared_mapping( struct mapping *mapping, int fd,
...
@@ -95,6 +95,7 @@ static int build_shared_mapping( struct mapping *mapping, int fd,
int
i
,
max_size
,
total_size
,
pos
;
int
i
,
max_size
,
total_size
,
pos
;
char
*
buffer
=
NULL
;
char
*
buffer
=
NULL
;
int
shared_fd
=
-
1
;
int
shared_fd
=
-
1
;
long
toread
;
/* compute the total size of the shared mapping */
/* compute the total size of the shared mapping */
...
@@ -127,10 +128,16 @@ static int build_shared_mapping( struct mapping *mapping, int fd,
...
@@ -127,10 +128,16 @@ static int build_shared_mapping( struct mapping *mapping, int fd,
if
(
!
(
sec
[
i
].
Characteristics
&
IMAGE_SCN_MEM_WRITE
))
continue
;
if
(
!
(
sec
[
i
].
Characteristics
&
IMAGE_SCN_MEM_WRITE
))
continue
;
if
(
lseek
(
shared_fd
,
pos
,
SEEK_SET
)
!=
pos
)
goto
error
;
if
(
lseek
(
shared_fd
,
pos
,
SEEK_SET
)
!=
pos
)
goto
error
;
pos
+=
ROUND_SIZE
(
0
,
sec
[
i
].
Misc
.
VirtualSize
);
pos
+=
ROUND_SIZE
(
0
,
sec
[
i
].
Misc
.
VirtualSize
);
if
(
sec
->
Characteristics
&
IMAGE_SCN_CNT_UNINITIALIZED_DATA
)
continue
;
if
(
sec
[
i
].
Characteristics
&
IMAGE_SCN_CNT_UNINITIALIZED_DATA
)
continue
;
if
(
!
sec
->
PointerToRawData
||
!
sec
->
SizeOfRawData
)
continue
;
if
(
!
sec
[
i
].
PointerToRawData
||
!
sec
[
i
].
SizeOfRawData
)
continue
;
if
(
lseek
(
fd
,
sec
[
i
].
PointerToRawData
,
SEEK_SET
)
!=
sec
[
i
].
PointerToRawData
)
goto
error
;
if
(
lseek
(
fd
,
sec
[
i
].
PointerToRawData
,
SEEK_SET
)
!=
sec
[
i
].
PointerToRawData
)
goto
error
;
if
(
read
(
fd
,
buffer
,
sec
[
i
].
SizeOfRawData
)
!=
sec
[
i
].
SizeOfRawData
)
goto
error
;
toread
=
sec
[
i
].
SizeOfRawData
;
while
(
toread
)
{
long
res
=
read
(
fd
,
buffer
+
sec
[
i
].
SizeOfRawData
-
toread
,
toread
);
if
(
res
<=
0
)
goto
error
;
toread
-=
res
;
}
if
(
write
(
shared_fd
,
buffer
,
sec
[
i
].
SizeOfRawData
)
!=
sec
[
i
].
SizeOfRawData
)
goto
error
;
if
(
write
(
shared_fd
,
buffer
,
sec
[
i
].
SizeOfRawData
)
!=
sec
[
i
].
SizeOfRawData
)
goto
error
;
}
}
close
(
shared_fd
);
close
(
shared_fd
);
...
...
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