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
7a441eaf
Commit
7a441eaf
authored
Dec 11, 2022
by
Alex Henrie
Committed by
Alexandre Julliard
Jan 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Handle memory allocation failure in image_locate_build_id_target (cppcheck).
parent
3e5a9565
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
module.c
dlls/dbghelp/module.c
+5
-1
No files found.
dlls/dbghelp/module.c
View file @
7a441eaf
...
...
@@ -660,6 +660,7 @@ static BOOL image_locate_build_id_target(struct image_file_map* fmap, const BYTE
p
=
malloc
(
sizeof
(
L"/usr/lib/debug/.build-id/"
)
+
(
idlen
*
2
+
1
)
*
sizeof
(
WCHAR
)
+
sizeof
(
L".debug"
));
if
(
!
p
)
goto
fail
;
wcscpy
(
p
,
L"/usr/lib/debug/.build-id/"
);
z
=
p
+
wcslen
(
p
);
if
(
idlen
)
...
...
@@ -684,9 +685,11 @@ static BOOL image_locate_build_id_target(struct image_file_map* fmap, const BYTE
sz
=
GetEnvironmentVariableW
(
L"WINEHOMEDIR"
,
NULL
,
0
);
if
(
sz
)
{
p
=
realloc
(
p
,
sz
*
sizeof
(
WCHAR
)
+
z
=
realloc
(
p
,
sz
*
sizeof
(
WCHAR
)
+
sizeof
(
L"
\\
.cache
\\
debuginfod_client
\\
"
)
+
idlen
*
2
*
sizeof
(
WCHAR
)
+
sizeof
(
L"
\\
debuginfo"
)
+
500
);
if
(
!
z
)
goto
fail
;
p
=
z
;
GetEnvironmentVariableW
(
L"WINEHOMEDIR"
,
p
,
sz
);
z
=
p
+
sz
-
1
;
wcscpy
(
z
,
L"
\\
.cache
\\
debuginfod_client
\\
"
);
...
...
@@ -703,6 +706,7 @@ static BOOL image_locate_build_id_target(struct image_file_map* fmap, const BYTE
}
TRACE
(
"not found
\n
"
);
fail:
free
(
p
);
HeapFree
(
GetProcessHeap
(),
0
,
fmap_link
);
return
FALSE
;
...
...
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