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
08a8f935
Commit
08a8f935
authored
Jul 07, 2009
by
Peter Oberndorfer
Committed by
Alexandre Julliard
Jul 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemenubuilder: Use heap_printf to allocate the right amount of memory and not…
winemenubuilder: Use heap_printf to allocate the right amount of memory and not cause heap corruption.
parent
44d633a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
winemenubuilder.c
programs/winemenubuilder/winemenubuilder.c
+3
-6
No files found.
programs/winemenubuilder/winemenubuilder.c
View file @
08a8f935
...
...
@@ -786,18 +786,15 @@ static char *extract_icon( LPCWSTR path, int index, const char *destFilename, BO
/* Try to treat the source file as an exe */
if
(
destFilename
)
xpm_path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
iconsdir
)
+
1
+
strlen
(
destFilename
)
+
1
+
3
);
xpm_path
=
heap_printf
(
"%s/%s.png"
,
iconsdir
,
destFilename
);
else
xpm_path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
iconsdir
)
+
1
+
4
+
1
+
strlen
(
ico_name
)
+
1
+
12
+
1
+
3
);
xpm_path
=
heap_printf
(
"%s/%04x_%s.%d.png"
,
iconsdir
,
crc
,
ico_name
,
index
);
if
(
xpm_path
==
NULL
)
{
WINE_ERR
(
"could not extract icon %s, out of memory
\n
"
,
wine_dbgstr_a
(
ico_name
));
return
NULL
;
}
if
(
destFilename
)
sprintf
(
xpm_path
,
"%s/%s.png"
,
iconsdir
,
destFilename
);
else
sprintf
(
xpm_path
,
"%s/%04x_%s.%d.png"
,
iconsdir
,
crc
,
ico_name
,
index
);
if
(
ExtractFromEXEDLL
(
path
,
index
,
xpm_path
))
goto
end
;
...
...
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