mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 14:10:32 +00:00
cmd: Don't overflow parameter length when copying substring.
This commit is contained in:
parent
37035e53cd
commit
7c3f3d09dd
@ -275,7 +275,7 @@ P0S
|
||||
q
|
||||
qwe
|
||||
er
|
||||
@todo_wine@'ty'@or_broken@''
|
||||
'ty'@or_broken@''
|
||||
't'@or_broken@''
|
||||
ert@or_broken@qwerty
|
||||
e@or_broken@qwerty
|
||||
|
@ -730,6 +730,7 @@ static WCHAR *WCMD_expand_envvar(WCHAR *start,
|
||||
else if (copybytes < 0) copybytes = 0;
|
||||
WCMD_strsubstW(start, endOfVar + 1, startCopy, copybytes);
|
||||
} else {
|
||||
substrlength = min(substrlength, len - (startCopy- thisVarContents + 1));
|
||||
WCMD_strsubstW(start, endOfVar + 1, startCopy, substrlength);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user