[ros-diffs] [jimtabor] 54070: - Fix get atom name so seh will not lock it up.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Mon Oct 10 04:49:55 UTC 2011


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/ntuser/useratom.c?rev=54070&r1=54069&r2=54070&view=diff
==============================================================================
--- 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)
    {




More information about the Ros-diffs mailing list