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
e685bed6
Commit
e685bed6
authored
Aug 07, 2016
by
André Hentschel
Committed by
Alexandre Julliard
Aug 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Explicitly set SizeOfRawData.
Signed-off-by:
André Hentschel
<
nerv@dawncrow.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d900c758
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
loader.c
dlls/kernel32/tests/loader.c
+7
-3
No files found.
dlls/kernel32/tests/loader.c
View file @
e685bed6
...
...
@@ -143,9 +143,9 @@ static const IMAGE_NT_HEADERS nt_header_template =
static
IMAGE_SECTION_HEADER
section
=
{
".rodata"
,
/* Name */
{
0
x10
},
/* Misc */
{
0
},
/* Misc */
0
,
/* VirtualAddress */
0
x0a
,
/* SizeOfRawData */
0
,
/* SizeOfRawData */
0
,
/* PointerToRawData */
0
,
/* PointerToRelocations */
0
,
/* PointerToLinenumbers */
...
...
@@ -196,6 +196,8 @@ static DWORD create_test_dll( const IMAGE_DOS_HEADER *dos_header, UINT dos_size,
assert
(
nt_header
->
FileHeader
.
NumberOfSections
<=
1
);
if
(
nt_header
->
FileHeader
.
NumberOfSections
)
{
section
.
SizeOfRawData
=
10
;
if
(
nt_header
->
OptionalHeader
.
SectionAlignment
>=
page_size
)
{
section
.
PointerToRawData
=
dos_size
;
...
...
@@ -2722,7 +2724,8 @@ static void test_ResolveDelayLoadedAPI(void)
/* sections */
section
.
PointerToRawData
=
nt_header
.
OptionalHeader
.
DataDirectory
[
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT
].
VirtualAddress
;
section
.
VirtualAddress
=
nt_header
.
OptionalHeader
.
DataDirectory
[
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT
].
VirtualAddress
;
section
.
Misc
.
VirtualSize
=
nt_header
.
OptionalHeader
.
DataDirectory
[
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT
].
Size
;
section
.
Misc
.
VirtualSize
=
2
*
sizeof
(
idd
);
section
.
SizeOfRawData
=
section
.
Misc
.
VirtualSize
;
section
.
Characteristics
=
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
;
SetLastError
(
0xdeadbeef
);
ret
=
WriteFile
(
hfile
,
&
section
,
sizeof
(
section
),
&
dummy
,
NULL
);
...
...
@@ -2734,6 +2737,7 @@ static void test_ResolveDelayLoadedAPI(void)
section
.
Misc
.
VirtualSize
=
sizeof
(
test_dll
)
+
sizeof
(
hint
)
+
sizeof
(
test_func
)
+
sizeof
(
HMODULE
)
+
2
*
(
i
+
1
)
*
sizeof
(
IMAGE_THUNK_DATA
);
ok
(
section
.
Misc
.
VirtualSize
<=
0x1000
,
"Too much tests, add a new section!
\n
"
);
section
.
SizeOfRawData
=
section
.
Misc
.
VirtualSize
;
section
.
Characteristics
=
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
|
IMAGE_SCN_MEM_WRITE
;
SetLastError
(
0xdeadbeef
);
ret
=
WriteFile
(
hfile
,
&
section
,
sizeof
(
section
),
&
dummy
,
NULL
);
...
...
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