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
6d62ef65
Commit
6d62ef65
authored
Feb 05, 2007
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Add a sanity check before dumping long format library export.
parent
d32d5a47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
lib.c
tools/winedump/lib.c
+8
-4
No files found.
tools/winedump/lib.c
View file @
6d62ef65
...
...
@@ -183,6 +183,9 @@ void lib_dump(void)
cur_file_pos
+=
sizeof
(
IMAGE_ARCHIVE_MEMBER_HEADER
);
size
=
strtoul
((
const
char
*
)
iamh
->
Size
,
NULL
,
10
);
size
=
(
size
+
1
)
&
~
1
;
/* align to an even address */
/* FIXME: only import library contents with the short format are
* recognized.
*/
...
...
@@ -193,6 +196,7 @@ void lib_dump(void)
}
else
if
(
strncmp
((
const
char
*
)
iamh
->
Name
,
IMAGE_ARCHIVE_LINKER_MEMBER
,
sizeof
(
iamh
->
Name
)))
{
long
expected_size
;
const
IMAGE_FILE_HEADER
*
fh
=
(
const
IMAGE_FILE_HEADER
*
)
ioh
;
if
(
globals
.
do_dumpheader
)
...
...
@@ -204,12 +208,12 @@ void lib_dump(void)
dump_optional_header
(
oh
,
fh
->
SizeOfOptionalHeader
);
}
}
dump_long_import
(
fh
,
(
const
IMAGE_SECTION_HEADER
*
)((
const
char
*
)
fh
+
sizeof
(
*
fh
)
+
fh
->
SizeOfOptionalHeader
),
fh
->
NumberOfSections
);
/* Sanity check */
expected_size
=
sizeof
(
*
fh
)
+
fh
->
SizeOfOptionalHeader
+
fh
->
NumberOfSections
*
sizeof
(
IMAGE_SECTION_HEADER
);
if
(
size
>
expected_size
)
dump_long_import
(
fh
,
(
const
IMAGE_SECTION_HEADER
*
)((
const
char
*
)
fh
+
sizeof
(
*
fh
)
+
fh
->
SizeOfOptionalHeader
),
fh
->
NumberOfSections
);
}
size
=
strtoul
((
const
char
*
)
iamh
->
Size
,
NULL
,
10
);
size
=
(
size
+
1
)
&
~
1
;
/* align to an even address */
cur_file_pos
+=
size
;
}
}
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