svn path=/trunk/; revision=36285
return 0;
}
+ /* make sure we don't overflow the maximum ANSI_STRING size */
+ if (nSize > 0x7fff)
+ nSize = 0x7fff;
+
Destination.Length = 0;
Destination.MaximumLength = (USHORT)nSize;
Destination.Buffer = lpDst;
RtlInitUnicodeString (&Source,
(LPWSTR)lpSrc);
+ /* make sure we don't overflow the maximum UNICODE_STRING size */
+ if (nSize > 0x7fff)
+ nSize = 0x7fff;
+
Destination.Length = 0;
Destination.MaximumLength = (USHORT)nSize * sizeof(WCHAR);
Destination.Buffer = lpDst;