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
0136bc27
Commit
0136bc27
authored
Mar 14, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version: Allocate the full virtual size of the section when loading PE resources.
parent
46bfaeae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
resource.c
dlls/version/resource.c
+6
-4
No files found.
dlls/version/resource.c
View file @
0136bc27
...
@@ -220,7 +220,7 @@ static BOOL find_pe_resource( HFILE lzfd, DWORD *resLen, DWORD *resOff )
...
@@ -220,7 +220,7 @@ static BOOL find_pe_resource( HFILE lzfd, DWORD *resLen, DWORD *resOff )
PIMAGE_DATA_DIRECTORY
resDataDir
;
PIMAGE_DATA_DIRECTORY
resDataDir
;
PIMAGE_SECTION_HEADER
sections
;
PIMAGE_SECTION_HEADER
sections
;
LPBYTE
resSection
;
LPBYTE
resSection
;
DWORD
resSectionS
ize
;
DWORD
section_size
,
data_s
ize
;
const
void
*
resDir
;
const
void
*
resDir
;
const
IMAGE_RESOURCE_DIRECTORY
*
resPtr
;
const
IMAGE_RESOURCE_DIRECTORY
*
resPtr
;
const
IMAGE_RESOURCE_DATA_ENTRY
*
resData
;
const
IMAGE_RESOURCE_DATA_ENTRY
*
resData
;
...
@@ -282,8 +282,9 @@ static BOOL find_pe_resource( HFILE lzfd, DWORD *resLen, DWORD *resOff )
...
@@ -282,8 +282,9 @@ static BOOL find_pe_resource( HFILE lzfd, DWORD *resLen, DWORD *resOff )
}
}
/* Read in resource section */
/* Read in resource section */
resSectionSize
=
sections
[
i
].
SizeOfRawData
;
data_size
=
sections
[
i
].
SizeOfRawData
;
resSection
=
HeapAlloc
(
GetProcessHeap
(),
0
,
resSectionSize
);
section_size
=
max
(
data_size
,
sections
[
i
].
Misc
.
VirtualSize
);
resSection
=
HeapAlloc
(
GetProcessHeap
(),
0
,
section_size
);
if
(
!
resSection
)
if
(
!
resSection
)
{
{
HeapFree
(
GetProcessHeap
(),
0
,
sections
);
HeapFree
(
GetProcessHeap
(),
0
,
sections
);
...
@@ -291,7 +292,8 @@ static BOOL find_pe_resource( HFILE lzfd, DWORD *resLen, DWORD *resOff )
...
@@ -291,7 +292,8 @@ static BOOL find_pe_resource( HFILE lzfd, DWORD *resLen, DWORD *resOff )
}
}
LZSeek
(
lzfd
,
sections
[
i
].
PointerToRawData
,
SEEK_SET
);
LZSeek
(
lzfd
,
sections
[
i
].
PointerToRawData
,
SEEK_SET
);
if
(
resSectionSize
!=
LZRead
(
lzfd
,
(
char
*
)
resSection
,
resSectionSize
)
)
goto
done
;
if
(
data_size
!=
LZRead
(
lzfd
,
(
char
*
)
resSection
,
data_size
))
goto
done
;
if
(
data_size
<
section_size
)
memset
(
(
char
*
)
resSection
+
data_size
,
0
,
section_size
-
data_size
);
/* Find resource */
/* Find resource */
resDir
=
resSection
+
(
resDataDir
->
VirtualAddress
-
sections
[
i
].
VirtualAddress
);
resDir
=
resSection
+
(
resDataDir
->
VirtualAddress
-
sections
[
i
].
VirtualAddress
);
...
...
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