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
26af8221
Commit
26af8221
authored
Jul 17, 2001
by
Andreas Mohr
Committed by
Alexandre Julliard
Jul 17, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More descriptive error on buffer overflow.
parent
e79f0768
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
debugtools.c
dlls/ntdll/debugtools.c
+10
-3
No files found.
dlls/ntdll/debugtools.c
View file @
26af8221
...
...
@@ -209,9 +209,16 @@ int wine_dbg_vprintf( const char *format, va_list args )
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
)
);
* the two checks are due to glibc changes in vsnprintfs return value
* the buffer size can be exceeded in case of a missing \n in
* debug output */
if
((
ret
==
-
1
)
||
(
ret
>=
sizeof
(
info
->
output
)
-
(
info
->
out_pos
-
info
->
output
)))
{
fprintf
(
stderr
,
"wine_dbg_vprintf: debugstr buffer overflow (contents: '%s')
\n
"
,
info
->
output
);
info
->
out_pos
=
info
->
output
;
abort
();
}
p
=
strrchr
(
info
->
out_pos
,
'\n'
);
if
(
!
p
)
info
->
out_pos
+=
ret
;
...
...
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