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
08b9b4f2
Commit
08b9b4f2
authored
Jun 06, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbeyj@wpi.edu>
Fixed response of GetFullPathNameA when buffer==NULL.
parent
e4f46dc3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
dos_fs.c
files/dos_fs.c
+10
-7
No files found.
files/dos_fs.c
View file @
08b9b4f2
...
...
@@ -1072,7 +1072,7 @@ static DWORD DOSFS_DoGetFullPathName( LPCSTR name, DWORD len, LPSTR result,
TRACE_
(
dosfs
)(
"converting '%s'
\n
"
,
name
);
if
(
!
name
||
!
result
||
((
drive
=
DOSFS_GetPathDrive
(
&
name
))
==
-
1
)
)
if
(
!
name
||
((
drive
=
DOSFS_GetPathDrive
(
&
name
))
==
-
1
)
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
...
...
@@ -1136,10 +1136,13 @@ static DWORD DOSFS_DoGetFullPathName( LPCSTR name, DWORD len, LPSTR result,
if
(
!
(
DRIVE_GetFlags
(
drive
)
&
DRIVE_CASE_PRESERVING
))
CharUpperA
(
buffer
);
if
(
unicode
)
lstrcpynAtoW
(
(
LPWSTR
)
result
,
buffer
,
len
);
else
lstrcpynA
(
result
,
buffer
,
len
);
if
(
result
)
{
if
(
unicode
)
lstrcpynAtoW
(
(
LPWSTR
)
result
,
buffer
,
len
);
else
lstrcpynA
(
result
,
buffer
,
len
);
}
TRACE_
(
dosfs
)(
"returning '%s'
\n
"
,
buffer
);
...
...
@@ -1164,7 +1167,7 @@ DWORD WINAPI GetFullPathNameA( LPCSTR name, DWORD len, LPSTR buffer,
LPSTR
*
lastpart
)
{
DWORD
ret
=
DOSFS_DoGetFullPathName
(
name
,
len
,
buffer
,
FALSE
);
if
(
ret
&&
lastpart
)
if
(
ret
&&
buffer
&&
lastpart
)
{
LPSTR
p
=
buffer
+
strlen
(
buffer
);
...
...
@@ -1188,7 +1191,7 @@ DWORD WINAPI GetFullPathNameW( LPCWSTR name, DWORD len, LPWSTR buffer,
LPSTR
nameA
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
name
);
DWORD
ret
=
DOSFS_DoGetFullPathName
(
nameA
,
len
,
(
LPSTR
)
buffer
,
TRUE
);
HeapFree
(
GetProcessHeap
(),
0
,
nameA
);
if
(
ret
&&
lastpart
)
if
(
ret
&&
buffer
&&
lastpart
)
{
LPWSTR
p
=
buffer
+
lstrlenW
(
buffer
);
if
(
*
p
!=
(
WCHAR
)
'\\'
)
...
...
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