Author: jimtabor Date: Mon Oct 10 04:49:53 2011 New Revision: 54070
URL: http://svn.reactos.org/svn/reactos?rev=54070&view=rev Log: - Fix get atom name so seh will not lock it up.
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/useratom.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/useratom.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/useratom.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/useratom.c [iso-8859-1] Mon Oct 10 04:49:53 2011 @@ -85,12 +85,15 @@ PUNICODE_STRING pBuffer) { DWORD Ret; + WCHAR Buffer[256]; UNICODE_STRING CapturedName = {0}; UserEnterShared(); + CapturedName.Buffer = (LPWSTR)&Buffer; + CapturedName.MaximumLength = sizeof(Buffer); + Ret = IntGetAtomName((RTL_ATOM)nAtom, CapturedName.Buffer, (ULONG)CapturedName.Length); _SEH2_TRY { - CapturedName = ProbeForReadUnicodeString(pBuffer); - Ret = IntGetAtomName((RTL_ATOM)nAtom, CapturedName.Buffer, (ULONG)CapturedName.Length); + RtlCopyMemory(pBuffer->Buffer, &Buffer, pBuffer->MaximumLength); } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {