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
508c4d93
Commit
508c4d93
authored
Feb 16, 2001
by
Chris Morgan
Committed by
Alexandre Julliard
Feb 16, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assert on output buffer overflow.
parent
7fdceb22
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
debugtools.c
dlls/ntdll/debugtools.c
+11
-2
No files found.
dlls/ntdll/debugtools.c
View file @
508c4d93
...
...
@@ -2,6 +2,7 @@
* Debugging functions
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
...
...
@@ -198,9 +199,17 @@ const char *wine_dbgstr_guid( const GUID *id )
int
wine_dbg_vprintf
(
const
char
*
format
,
va_list
args
)
{
struct
debug_info
*
info
=
get_info
();
char
*
p
;
int
ret
=
vsprintf
(
info
->
out_pos
,
format
,
args
);
char
*
p
=
strrchr
(
info
->
out_pos
,
'\n'
);
int
ret
=
vsnprintf
(
info
->
out_pos
,
sizeof
(
info
->
output
)
-
(
info
->
out_pos
-
info
->
output
),
format
,
args
);
/* make sure we didn't exceed the buffer length
* the two asserts are due to glibc changes in vsnprintfs return value */
assert
(
ret
!=
-
1
);
assert
(
ret
<
sizeof
(
info
->
output
)
-
(
info
->
out_pos
-
info
->
output
)
);
p
=
strrchr
(
info
->
out_pos
,
'\n'
);
if
(
!
p
)
info
->
out_pos
+=
ret
;
else
{
...
...
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