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
29de7dd6
Commit
29de7dd6
authored
Dec 20, 2013
by
Sebastian Lackner
Committed by
Alexandre Julliard
Dec 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Handle error if RtlAllocateHeap fails in printf functions.
parent
661212b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
printf.c
dlls/ntdll/printf.c
+11
-3
No files found.
dlls/ntdll/printf.c
View file @
29de7dd6
...
...
@@ -300,7 +300,13 @@ static void pf_integer_conv( char *buf, int buf_len, pf_flags *flags,
char
number
[
40
],
*
tmp
=
number
;
if
(
buf_len
>
sizeof
number
)
tmp
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
buf_len
);
{
if
(
!
(
tmp
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
buf_len
)))
{
buf
[
0
]
=
'\0'
;
return
;
}
}
base
=
10
;
if
(
flags
->
Format
==
'o'
)
...
...
@@ -588,7 +594,8 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, __ms_va_list valis
flags
.
FieldLength
:
flags
.
Precision
)
+
10
;
if
(
x_len
>=
sizeof
number
)
x
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
x_len
);
if
(
!
(
x
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
x_len
)))
return
-
1
;
pf_integer_conv
(
x
,
x_len
,
&
flags
,
va_arg
(
valist
,
LONGLONG
)
);
...
...
@@ -611,7 +618,8 @@ static int pf_vsnprintf( pf_output *out, const WCHAR *format, __ms_va_list valis
flags
.
FieldLength
:
flags
.
Precision
)
+
10
;
if
(
x_len
>=
sizeof
number
)
x
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
x_len
);
if
(
!
(
x
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
x_len
)))
return
-
1
;
pf_rebuild_format_string
(
fmt
,
&
flags
);
...
...
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