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
ccf9b18e
Commit
ccf9b18e
authored
Oct 20, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: GetLongPathName should fail when called with a wildcard.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3a78ec67
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
path.c
dlls/kernel32/path.c
+8
-2
path.c
dlls/kernel32/tests/path.c
+0
-2
No files found.
dlls/kernel32/path.c
View file @
ccf9b18e
...
@@ -297,6 +297,8 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
...
@@ -297,6 +297,8 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
HANDLE
goit
;
HANDLE
goit
;
BOOL
is_legal_8dot3
;
BOOL
is_legal_8dot3
;
TRACE
(
"%s,%p,%u
\n
"
,
debugstr_w
(
shortpath
),
longpath
,
longlen
);
if
(
!
shortpath
)
if
(
!
shortpath
)
{
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
...
@@ -308,8 +310,6 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
...
@@ -308,8 +310,6 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
return
0
;
return
0
;
}
}
TRACE
(
"%s,%p,%d
\n
"
,
debugstr_w
(
shortpath
),
longpath
,
longlen
);
if
(
shortpath
[
0
]
==
'\\'
&&
shortpath
[
1
]
==
'\\'
)
if
(
shortpath
[
0
]
==
'\\'
&&
shortpath
[
1
]
==
'\\'
)
{
{
FIXME
(
"UNC pathname %s
\n
"
,
debugstr_w
(
shortpath
));
FIXME
(
"UNC pathname %s
\n
"
,
debugstr_w
(
shortpath
));
...
@@ -333,6 +333,12 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
...
@@ -333,6 +333,12 @@ DWORD WINAPI GetLongPathNameW( LPCWSTR shortpath, LPWSTR longpath, DWORD longlen
lp
=
sp
=
2
;
lp
=
sp
=
2
;
}
}
if
(
strpbrkW
(
shortpath
+
sp
,
wildcardsW
))
{
SetLastError
(
ERROR_INVALID_NAME
);
return
0
;
}
while
(
shortpath
[
sp
])
while
(
shortpath
[
sp
])
{
{
/* check for path delimiters and reproduce them */
/* check for path delimiters and reproduce them */
...
...
dlls/kernel32/tests/path.c
View file @
ccf9b18e
...
@@ -1202,9 +1202,7 @@ static void test_GetLongPathNameA(void)
...
@@ -1202,9 +1202,7 @@ static void test_GetLongPathNameA(void)
strcpy
(
name
,
"*"
);
strcpy
(
name
,
"*"
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
length
=
pGetLongPathNameA
(
tempfile
,
temppath
,
MAX_PATH
);
length
=
pGetLongPathNameA
(
tempfile
,
temppath
,
MAX_PATH
);
todo_wine
ok
(
!
length
,
"GetLongPathNameA should fail
\n
"
);
ok
(
!
length
,
"GetLongPathNameA should fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_NAME
,
"wrong error %d
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_INVALID_NAME
,
"wrong error %d
\n
"
,
GetLastError
());
strcpy
(
name
,
"longfilename.longext"
);
strcpy
(
name
,
"longfilename.longext"
);
...
...
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