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
3474e3da
Commit
3474e3da
authored
Apr 16, 2011
by
Andrew Nguyen
Committed by
Alexandre Julliard
Apr 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevdm: Fix incorrect heap allocation sizes and possible out-of-bounds access…
winevdm: Fix incorrect heap allocation sizes and possible out-of-bounds access in find_dosbox helper.
parent
281f86ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
winevdm.c
programs/winevdm/winevdm.c
+7
-3
No files found.
programs/winevdm/winevdm.c
View file @
3474e3da
...
...
@@ -114,11 +114,15 @@ static char *find_dosbox(void)
const
char
*
envpath
=
getenv
(
"PATH"
);
struct
stat
st
;
char
*
path
,
*
p
,
*
buffer
,
*
dir
;
size_t
envpath_len
;
if
(
!
envpath
)
return
NULL
;
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
envpath
)
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
path
)
+
sizeof
(
"/dosbox"
)
);
envpath_len
=
strlen
(
envpath
);
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
envpath_len
+
1
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
envpath_len
+
sizeof
(
"/dosbox"
)
);
strcpy
(
path
,
envpath
);
p
=
path
;
while
(
*
p
)
{
...
...
@@ -126,7 +130,7 @@ static char *find_dosbox(void)
if
(
!*
p
)
break
;
dir
=
p
;
while
(
*
p
&&
*
p
!=
':'
)
p
++
;
*
p
++
=
0
;
if
(
*
p
==
':'
)
*
p
++
=
0
;
strcpy
(
buffer
,
dir
);
strcat
(
buffer
,
"/dosbox"
);
if
(
!
stat
(
buffer
,
&
st
))
...
...
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