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
789512be
Commit
789512be
authored
Nov 22, 2021
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Fix allocation error in image_load_debugaltlink.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f10635ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
module.c
dlls/dbghelp/module.c
+4
-3
No files found.
dlls/dbghelp/module.c
View file @
789512be
...
...
@@ -671,9 +671,9 @@ struct image_file_map* image_load_debugaltlink(struct image_file_map* fmap, stru
*/
sect_len
=
image_get_map_size
(
&
debugaltlink_sect
);
id
=
memchr
(
data
,
'\0'
,
sect_len
);
if
(
id
)
if
(
id
++
)
{
id
++
;
unsigned
idlen
=
(
const
BYTE
*
)
data
+
sect_len
-
id
;
fmap_link
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
fmap_link
));
if
(
fmap_link
)
{
...
...
@@ -691,7 +691,8 @@ struct image_file_map* image_load_debugaltlink(struct image_file_map* fmap, stru
{
static
const
WCHAR
globalDebugDirW
[]
=
{
'/'
,
'u'
,
's'
,
'r'
,
'/'
,
'l'
,
'i'
,
'b'
,
'/'
,
'd'
,
'e'
,
'b'
,
'u'
,
'g'
,
'/'
,
'.'
,
'b'
,
'u'
,
'i'
,
'l'
,
'd'
,
'-'
,
'i'
,
'd'
,
'/'
};
dst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
globalDebugDirW
)
+
(
3
+
filename_len
)
*
sizeof
(
WCHAR
));
dst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
globalDebugDirW
)
+
(
3
+
filename_len
+
idlen
*
2
)
*
sizeof
(
WCHAR
));
if
(
dst
)
{
WCHAR
*
p
;
...
...
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