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
c7fafe7e
Commit
c7fafe7e
authored
Sep 25, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Use the IMAGE_FIRST_SECTION helper macro.
parent
176a6ca2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
typelib.c
tools/widl/typelib.c
+2
-2
No files found.
tools/widl/typelib.c
View file @
c7fafe7e
...
...
@@ -289,7 +289,7 @@ static void read_msft_importlib(importlib_t *importlib, void *data, unsigned int
static
unsigned
int
rva_to_va
(
const
IMAGE_NT_HEADERS32
*
nt
,
unsigned
int
rva
)
{
IMAGE_SECTION_HEADER
*
sec
=
(
IMAGE_SECTION_HEADER
*
)((
char
*
)
&
nt
->
OptionalHeader
+
nt
->
FileHeader
.
SizeOfOptionalHeader
);
IMAGE_SECTION_HEADER
*
sec
=
IMAGE_FIRST_SECTION
(
nt
);
unsigned
int
i
;
for
(
i
=
0
;
i
<
nt
->
FileHeader
.
NumberOfSections
;
i
++
,
sec
++
)
...
...
@@ -312,7 +312,7 @@ static void read_pe_importlib(importlib_t *importlib, void *data, unsigned int s
if
(
dos
->
e_lfanew
<
sizeof
(
*
dos
)
||
dos
->
e_lfanew
>=
size
)
error
(
"not a PE file
\n
"
);
nt
=
(
IMAGE_NT_HEADERS32
*
)((
char
*
)
data
+
dos
->
e_lfanew
);
if
(
nt
->
Signature
!=
IMAGE_NT_SIGNATURE
)
error
(
"not a PE file
\n
"
);
if
((
char
*
)
&
nt
->
OptionalHeader
+
nt
->
FileHeader
.
SizeOfOptionalHeader
>
(
char
*
)
data
+
size
)
if
((
char
*
)
(
IMAGE_FIRST_SECTION
(
nt
)
+
nt
->
FileHeader
.
NumberOfSections
)
>
(
char
*
)
data
+
size
)
error
(
"invalid PE file
\n
"
);
switch
(
nt
->
OptionalHeader
.
Magic
)
{
...
...
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