mirror of
https://github.com/reactos/reactos.git
synced 2025-07-04 02:21:22 +00:00
fix a kernel32 environ winetest
svn path=/trunk/; revision=36285
This commit is contained in:
parent
3ed4acffca
commit
15e6477932
1 changed files with 8 additions and 0 deletions
|
@ -425,6 +425,10 @@ ExpandEnvironmentStringsA (
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* make sure we don't overflow the maximum ANSI_STRING size */
|
||||||
|
if (nSize > 0x7fff)
|
||||||
|
nSize = 0x7fff;
|
||||||
|
|
||||||
Destination.Length = 0;
|
Destination.Length = 0;
|
||||||
Destination.MaximumLength = (USHORT)nSize;
|
Destination.MaximumLength = (USHORT)nSize;
|
||||||
Destination.Buffer = lpDst;
|
Destination.Buffer = lpDst;
|
||||||
|
@ -491,6 +495,10 @@ ExpandEnvironmentStringsW (
|
||||||
RtlInitUnicodeString (&Source,
|
RtlInitUnicodeString (&Source,
|
||||||
(LPWSTR)lpSrc);
|
(LPWSTR)lpSrc);
|
||||||
|
|
||||||
|
/* make sure we don't overflow the maximum UNICODE_STRING size */
|
||||||
|
if (nSize > 0x7fff)
|
||||||
|
nSize = 0x7fff;
|
||||||
|
|
||||||
Destination.Length = 0;
|
Destination.Length = 0;
|
||||||
Destination.MaximumLength = (USHORT)nSize * sizeof(WCHAR);
|
Destination.MaximumLength = (USHORT)nSize * sizeof(WCHAR);
|
||||||
Destination.Buffer = lpDst;
|
Destination.Buffer = lpDst;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue