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
9f28d9a1
Commit
9f28d9a1
authored
Sep 24, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Cope with an empty resource section in UpdateResource.
parent
bb4050d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
resource.c
dlls/kernel32/resource.c
+11
-10
No files found.
dlls/kernel32/resource.c
View file @
9f28d9a1
...
...
@@ -1078,6 +1078,9 @@ static BOOL read_mapped_resources( QUEUEDUPDATES *updates, void *base, DWORD map
TRACE
(
"found .rsrc at %08x, size %08x
\n
"
,
sec
[
i
].
PointerToRawData
,
sec
[
i
].
SizeOfRawData
);
if
(
!
sec
[
i
].
PointerToRawData
||
sec
[
i
].
SizeOfRawData
<
sizeof
(
IMAGE_RESOURCE_DIRECTORY
))
return
TRUE
;
root
=
(
void
*
)
((
BYTE
*
)
base
+
sec
[
i
].
PointerToRawData
);
enumerate_mapped_resources
(
updates
,
base
,
mapping_size
,
root
);
...
...
@@ -1404,13 +1407,6 @@ static IMAGE_SECTION_HEADER *get_resource_section( void *base, DWORD mapping_siz
return
NULL
;
}
/* check that the resources section is last */
if
(
i
!=
num_sections
-
1
)
{
FIXME
(
".rsrc isn't the last section
\n
"
);
return
NULL
;
}
return
&
sec
[
i
];
}
...
...
@@ -1487,10 +1483,15 @@ static BOOL write_raw_resources( QUEUEDUPDATES *updates )
if
(
!
sec
)
goto
done
;
if
((
sec
->
SizeOfRawData
+
sec
->
PointerToRawData
)
!=
write_map
->
size
)
if
(
!
sec
->
PointerToRawData
)
/* empty section */
{
sec
->
PointerToRawData
=
write_map
->
size
;
sec
->
SizeOfRawData
=
0
;
}
else
if
((
sec
->
SizeOfRawData
+
sec
->
PointerToRawData
)
!=
write_map
->
size
)
{
FIXME
(
".rsrc isn't at the end of the image %08x + %08x != %08x
\n
"
,
sec
->
SizeOfRawData
,
sec
->
PointerToRawData
,
write_map
->
size
);
FIXME
(
".rsrc isn't at the end of the image %08x + %08x != %08x
for %s
\n
"
,
sec
->
SizeOfRawData
,
sec
->
PointerToRawData
,
write_map
->
size
,
debugstr_w
(
updates
->
pFileName
)
);
goto
done
;
}
...
...
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