Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c4885bc4
Commit
c4885bc4
authored
Jun 03, 2007
by
Jason Edmeades
Committed by
Alexandre Julliard
Jun 04, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd.exe: Fix handling of malformed environment variable expansion.
parent
afe4d80a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
wcmdmain.c
programs/cmd/wcmdmain.c
+8
-2
No files found.
programs/cmd/wcmdmain.c
View file @
c4885bc4
...
...
@@ -1535,9 +1535,15 @@ static WCHAR *WCMD_expand_envvar(WCHAR *start) {
/* Find the end of the environment variable, and extract name */
endOfVar
=
strchrW
(
start
+
1
,
'%'
);
if
(
endOfVar
==
NULL
)
{
/* FIXME: Some special conditions here depending on whether
/* In batch program, missing terminator for % and no following
':' just removes the '%' */
s
=
WCMD_strdupW
(
start
+
1
);
strcpyW
(
start
,
s
);
free
(
s
);
/* FIXME: Some other special conditions here depending on whether
in batch, complex or not, and whether env var exists or not! */
return
start
+
1
;
return
start
;
}
memcpy
(
thisVar
,
start
,
((
endOfVar
-
start
)
+
1
)
*
sizeof
(
WCHAR
));
thisVar
[(
endOfVar
-
start
)
+
1
]
=
0x00
;
...
...
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