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
f05549b7
Commit
f05549b7
authored
Jan 29, 2020
by
Piotr Caban
Committed by
Alexandre Julliard
Jan 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add support for quoted paths in _wsearchenv_s.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
98c554ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
dir.c
dlls/msvcrt/dir.c
+18
-3
No files found.
dlls/msvcrt/dir.c
View file @
f05549b7
...
@@ -1833,12 +1833,27 @@ int CDECL MSVCRT__wsearchenv_s(const MSVCRT_wchar_t* file, const MSVCRT_wchar_t*
...
@@ -1833,12 +1833,27 @@ int CDECL MSVCRT__wsearchenv_s(const MSVCRT_wchar_t* file, const MSVCRT_wchar_t*
for
(;
*
penv
;
penv
=
(
*
end
?
end
+
1
:
end
))
for
(;
*
penv
;
penv
=
(
*
end
?
end
+
1
:
end
))
{
{
end
=
penv
;
end
=
penv
;
while
(
*
end
&&
*
end
!=
';'
)
end
++
;
/* Find end of next path */
path_len
=
0
;
path_len
=
end
-
penv
;
while
(
*
end
&&
*
end
!=
';'
&&
path_len
<
MAX_PATH
)
{
if
(
*
end
==
'"'
)
{
end
++
;
while
(
*
end
&&
*
end
!=
'"'
&&
path_len
<
MAX_PATH
)
{
path
[
path_len
++
]
=
*
end
;
end
++
;
}
if
(
*
end
==
'"'
)
end
++
;
continue
;
}
path
[
path_len
++
]
=
*
end
;
end
++
;
}
if
(
!
path_len
||
path_len
>=
MAX_PATH
)
if
(
!
path_len
||
path_len
>=
MAX_PATH
)
continue
;
continue
;
memcpy
(
path
,
penv
,
path_len
*
sizeof
(
MSVCRT_wchar_t
));
if
(
path
[
path_len
-
1
]
!=
'/'
&&
path
[
path_len
-
1
]
!=
'\\'
)
if
(
path
[
path_len
-
1
]
!=
'/'
&&
path
[
path_len
-
1
]
!=
'\\'
)
path
[
path_len
++
]
=
'\\'
;
path
[
path_len
++
]
=
'\\'
;
if
(
path_len
+
fname_len
>=
MAX_PATH
)
if
(
path_len
+
fname_len
>=
MAX_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