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
4db6d184
Commit
4db6d184
authored
Feb 16, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
menubuilder: Use va_start/va_end around vsnprintf() on every call.
parent
98f0be8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
winemenubuilder.c
programs/winemenubuilder/winemenubuilder.c
+3
-2
No files found.
programs/winemenubuilder/winemenubuilder.c
View file @
4db6d184
...
...
@@ -236,13 +236,14 @@ static char* heap_printf(const char *format, ...)
char
*
buffer
,
*
ret
;
int
n
;
va_start
(
args
,
format
);
while
(
1
)
{
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
buffer
==
NULL
)
break
;
va_start
(
args
,
format
);
n
=
vsnprintf
(
buffer
,
size
,
format
,
args
);
va_end
(
args
);
if
(
n
==
-
1
)
size
*=
2
;
else
if
(
n
>=
size
)
...
...
@@ -251,7 +252,7 @@ static char* heap_printf(const char *format, ...)
break
;
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
va_end
(
args
);
if
(
!
buffer
)
return
NULL
;
ret
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
buffer
,
strlen
(
buffer
)
+
1
);
if
(
!
ret
)
ret
=
buffer
;
...
...
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