mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
- Put Dx values at start of buffer to have alignemnt of 4
- increase size of stack buffer to 100, results in >90% buffer hits - Handle Dy values when ETO_PDY is specified (patch by Alexander Potashev, aspotashev at gmail dot com) See issue #3958 for more details. svn path=/trunk/; revision=38328
This commit is contained in:
parent
21c30014ed
commit
ba15efc312
1 changed files with 11 additions and 3 deletions
|
@ -3603,6 +3603,12 @@ GreExtTextOutW(
|
||||||
TextLeft += Dx[i<<DxShift] << 6;
|
TextLeft += Dx[i<<DxShift] << 6;
|
||||||
// DbgPrint("new TextLeft2: %d\n", TextLeft);
|
// DbgPrint("new TextLeft2: %d\n", TextLeft);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DxShift)
|
||||||
|
{
|
||||||
|
TextTop -= Dx[2 * i + 1] << 6;
|
||||||
|
}
|
||||||
|
|
||||||
previous = glyph_index;
|
previous = glyph_index;
|
||||||
|
|
||||||
String++;
|
String++;
|
||||||
|
@ -3651,7 +3657,7 @@ fail:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define STACK_TEXT_BUFFER_SIZE 50
|
#define STACK_TEXT_BUFFER_SIZE 100
|
||||||
BOOL
|
BOOL
|
||||||
APIENTRY
|
APIENTRY
|
||||||
NtGdiExtTextOutW(
|
NtGdiExtTextOutW(
|
||||||
|
@ -3706,17 +3712,19 @@ NtGdiExtTextOutW(
|
||||||
/* Probe and copy user mode data to the buffer */
|
/* Probe and copy user mode data to the buffer */
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
|
/* Put the Dx before the String to assure alignment of 4 */
|
||||||
|
SafeString = (LPWSTR)(((ULONG_PTR)Buffer) + DxSize);
|
||||||
|
|
||||||
/* Probe and copy the string */
|
/* Probe and copy the string */
|
||||||
ProbeForRead(UnsafeString, StringSize, 1);
|
ProbeForRead(UnsafeString, StringSize, 1);
|
||||||
SafeString = Buffer;
|
|
||||||
memcpy((PVOID)SafeString, UnsafeString, StringSize);
|
memcpy((PVOID)SafeString, UnsafeString, StringSize);
|
||||||
|
|
||||||
/* If we have Dx values... */
|
/* If we have Dx values... */
|
||||||
if (UnsafeDx)
|
if (UnsafeDx)
|
||||||
{
|
{
|
||||||
/* ... probe and copy them */
|
/* ... probe and copy them */
|
||||||
|
SafeDx = Buffer;
|
||||||
ProbeForRead(UnsafeDx, DxSize, 1);
|
ProbeForRead(UnsafeDx, DxSize, 1);
|
||||||
SafeDx = (LPINT)(((ULONG_PTR)Buffer) + StringSize);
|
|
||||||
memcpy(SafeDx, UnsafeDx, DxSize);
|
memcpy(SafeDx, UnsafeDx, DxSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue