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
270d66ef
Commit
270d66ef
authored
Jun 15, 2014
by
Sebastian Lackner
Committed by
Alexandre Julliard
Jun 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Update VirtualAddress of resource section in write_raw_resources.
parent
3ccaad8b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
resource.c
dlls/kernel32/resource.c
+1
-0
resource.c
dlls/kernel32/tests/resource.c
+6
-0
No files found.
dlls/kernel32/resource.c
View file @
270d66ef
...
...
@@ -1554,6 +1554,7 @@ static BOOL write_raw_resources( QUEUEDUPDATES *updates )
sec
->
SizeOfRawData
=
section_size
;
sec
->
Misc
.
VirtualSize
=
virtual_section_size
;
nt
->
OptionalHeader
.
SizeOfImage
+=
rva_delta
;
nt
->
OptionalHeader
.
DataDirectory
[
IMAGE_DIRECTORY_ENTRY_RESOURCE
].
VirtualAddress
=
sec
->
VirtualAddress
;
nt
->
OptionalHeader
.
DataDirectory
[
IMAGE_DIRECTORY_ENTRY_RESOURCE
].
Size
=
res_size
.
total_size
;
nt
->
OptionalHeader
.
SizeOfInitializedData
=
get_init_data_size
(
write_map
->
base
,
mapping_size
);
}
...
...
dlls/kernel32/tests/resource.c
View file @
270d66ef
...
...
@@ -394,6 +394,7 @@ static void check_exe( const sec_verify *verify )
int
i
;
IMAGE_DOS_HEADER
*
dos
;
IMAGE_NT_HEADERS
*
nt
;
IMAGE_OPTIONAL_HEADER
*
opt
;
IMAGE_SECTION_HEADER
*
sec
;
IMAGE_RESOURCE_DIRECTORY
*
dir
;
HANDLE
file
,
mapping
;
...
...
@@ -415,6 +416,7 @@ static void check_exe( const sec_verify *verify )
goto
end
;
nt
=
(
void
*
)
((
BYTE
*
)
dos
+
dos
->
e_lfanew
);
opt
=
&
nt
->
OptionalHeader
;
sec
=
(
void
*
)
&
nt
[
1
];
for
(
i
=
0
;
i
<
max_sections
;
i
++
)
...
...
@@ -444,6 +446,10 @@ static void check_exe( const sec_verify *verify )
verify
->
NumberOfNamedEntries
,
dir
->
NumberOfNamedEntries
);
ok
(
dir
->
NumberOfIdEntries
==
verify
->
NumberOfIdEntries
,
"NumberOfIdEntries should be %d instead of %d
\n
"
,
verify
->
NumberOfIdEntries
,
dir
->
NumberOfIdEntries
);
ok
(
opt
->
DataDirectory
[
IMAGE_FILE_RESOURCE_DIRECTORY
].
VirtualAddress
==
sec
[
verify
->
rsrc_section
].
VirtualAddress
,
"VirtualAddress in optional header should be %d instead of %d
\n
"
,
sec
[
verify
->
rsrc_section
].
VirtualAddress
,
opt
->
DataDirectory
[
IMAGE_FILE_RESOURCE_DIRECTORY
].
VirtualAddress
);
}
end:
...
...
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