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
586808fd
Commit
586808fd
authored
Feb 19, 2003
by
Warren Baird
Committed by
Alexandre Julliard
Feb 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Avoid possible seg fault when calling TRACE with NULL string pointers.
- Fix bad side-effect of makepath on input parameters.
parent
001fa262
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
dir.c
dlls/msvcrt/dir.c
+15
-12
No files found.
dlls/msvcrt/dir.c
View file @
586808fd
...
...
@@ -677,37 +677,40 @@ VOID _makepath(char * path, const char * drive,
const
char
*
extension
)
{
char
ch
;
TRACE
(
"got %s %s %s %s
\n
"
,
drive
,
directory
,
filename
,
extension
);
char
tmpPath
[
MAX_PATH
];
TRACE
(
"got %s %s %s %s
\n
"
,
debugstr_a
(
drive
),
debugstr_a
(
directory
),
debugstr_a
(
filename
),
debugstr_a
(
extension
)
);
if
(
!
path
)
return
;
path
[
0
]
=
0
;
tmpPath
[
0
]
=
'\0'
;
if
(
drive
&&
drive
[
0
])
{
p
ath
[
0
]
=
drive
[
0
];
p
ath
[
1
]
=
':'
;
p
ath
[
2
]
=
0
;
tmpP
ath
[
0
]
=
drive
[
0
];
tmpP
ath
[
1
]
=
':'
;
tmpP
ath
[
2
]
=
0
;
}
if
(
directory
&&
directory
[
0
])
{
strcat
(
p
ath
,
directory
);
ch
=
path
[
strlen
(
p
ath
)
-
1
];
strcat
(
tmpP
ath
,
directory
);
ch
=
tmpPath
[
strlen
(
tmpP
ath
)
-
1
];
if
(
ch
!=
'/'
&&
ch
!=
'\\'
)
strcat
(
p
ath
,
"
\\
"
);
strcat
(
tmpP
ath
,
"
\\
"
);
}
if
(
filename
&&
filename
[
0
])
{
strcat
(
p
ath
,
filename
);
strcat
(
tmpP
ath
,
filename
);
if
(
extension
&&
extension
[
0
])
{
if
(
extension
[
0
]
!=
'.'
)
strcat
(
p
ath
,
"."
);
strcat
(
p
ath
,
extension
);
strcat
(
tmpP
ath
,
"."
);
strcat
(
tmpP
ath
,
extension
);
}
}
strcpy
(
path
,
tmpPath
);
TRACE
(
"returning %s
\n
"
,
path
);
}
...
...
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