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
c3b80267
Commit
c3b80267
authored
Jul 01, 2009
by
Jörg Höhle
Committed by
Alexandre Julliard
Jul 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Avoid unprotected sprintf on registry/user-supplied format string.
parent
62a21968
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
except.c
dlls/kernel32/except.c
+5
-4
No files found.
dlls/kernel32/except.c
View file @
c3b80267
...
...
@@ -265,15 +265,16 @@ static BOOL start_debugger(PEXCEPTION_POINTERS epointers, HANDLE hEvent)
if
(
format
)
{
cmdline
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
format
)
+
2
*
20
);
sprintf
(
cmdline
,
format
,
GetCurrentProcessId
(),
hEvent
);
size_t
format_size
=
strlen
(
format
)
+
2
*
20
;
cmdline
=
HeapAlloc
(
GetProcessHeap
(),
0
,
format_size
);
snprintf
(
cmdline
,
format_size
,
format
,
(
long
)
GetCurrentProcessId
(),
(
long
)
HandleToLong
(
hEvent
));
HeapFree
(
GetProcessHeap
(),
0
,
format
);
}
else
{
cmdline
=
HeapAlloc
(
GetProcessHeap
(),
0
,
80
);
s
printf
(
cmdline
,
"winedbg --auto %d %ld"
,
GetCurrentProcessId
(),
(
ULONG_PTR
)
hEvent
);
s
nprintf
(
cmdline
,
80
,
"winedbg --auto %ld %ld"
,
/* as in tools/wine.inf */
(
long
)
GetCurrentProcessId
(),
(
long
)
HandleToLong
(
hEvent
)
);
}
if
(
!
bAuto
)
...
...
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