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
5a4f3b47
Commit
5a4f3b47
authored
Sep 19, 2012
by
Francois Gouget
Committed by
Alexandre Julliard
Sep 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: There is no need to zero-fill the FormatMessage() temporary buffer.
parent
bca6e18d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
format_msg.c
dlls/kernel32/format_msg.c
+2
-2
No files found.
dlls/kernel32/format_msg.c
View file @
5a4f3b47
...
...
@@ -272,7 +272,7 @@ static void format_add_char(struct _format_message_data *fmd, WCHAR c)
{
*
fmd
->
t
++
=
c
;
if
((
DWORD
)(
fmd
->
t
-
fmd
->
formatted
)
==
fmd
->
size
)
{
fmd
->
formatted
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
fmd
->
formatted
,
(
fmd
->
size
*
2
)
*
sizeof
(
WCHAR
));
fmd
->
formatted
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
fmd
->
formatted
,
(
fmd
->
size
*
2
)
*
sizeof
(
WCHAR
));
fmd
->
t
=
fmd
->
formatted
+
fmd
->
size
;
fmd
->
size
*=
2
;
}
...
...
@@ -290,7 +290,7 @@ static LPWSTR format_message( BOOL unicode_caller, DWORD dwFlags, LPCWSTR fmtstr
BOOL
eos
=
FALSE
;
fmd
.
size
=
100
;
fmd
.
formatted
=
fmd
.
t
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
fmd
.
size
*
sizeof
(
WCHAR
)
);
fmd
.
formatted
=
fmd
.
t
=
HeapAlloc
(
GetProcessHeap
(),
0
,
fmd
.
size
*
sizeof
(
WCHAR
)
);
f
=
fmtstr
;
while
(
*
f
&&
!
eos
)
{
...
...
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