Commit 4d6b7475 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

kernel32: Add a define for UNICODE_STRING_MAX_CHARS.

parent 9db754fe
......@@ -364,8 +364,8 @@ DWORD WINAPI ExpandEnvironmentStringsW( LPCWSTR src, LPWSTR dst, DWORD len )
RtlInitUnicodeString(&us_src, src);
/* make sure we don't overflow the maximum UNICODE_STRING size */
if (len > 0x7fff)
len = 0x7fff;
if (len > UNICODE_STRING_MAX_CHARS)
len = UNICODE_STRING_MAX_CHARS;
us_dst.Length = 0;
us_dst.MaximumLength = len * sizeof(WCHAR);
......
......@@ -617,6 +617,8 @@ typedef struct _MEMORY_BASIC_INFORMATION
#define MAXWORD 0xffff
#define MAXDWORD 0xffffffff
#define UNICODE_STRING_MAX_CHARS 32767
#define FIELD_OFFSET(type, field) \
((LONG)(INT_PTR)&(((type *)0)->field))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment