don't copy the buffer to a random pointer in IntWriteConsoleOutput()
authorThomas Bluemel <thomas@reactsoft.com>
Mon, 26 Sep 2005 11:10:27 +0000 (11:10 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Mon, 26 Sep 2005 11:10:27 +0000 (11:10 +0000)
svn path=/trunk/; revision=18084

reactos/lib/kernel32/misc/console.c

index 8a3dbae..fbef784 100644 (file)
@@ -1999,7 +1999,6 @@ IntWriteConsoleOutput(HANDLE hConsoleOutput,
   PCSR_CAPTURE_BUFFER CaptureBuffer;
   NTSTATUS Status;
   ULONG Size;
-  PVOID BufferTargetBase;
 
   Size = dwBufferSize.Y * dwBufferSize.X * sizeof(CHAR_INFO);
 
@@ -2014,7 +2013,7 @@ IntWriteConsoleOutput(HANDLE hConsoleOutput,
                           (PVOID*)&Request.Data.WriteConsoleOutputRequest.CharInfo);
 
   /* Copy from the buffer */
-  RtlCopyMemory(BufferTargetBase, lpBuffer, Size);
+  RtlCopyMemory(&Request.Data.WriteConsoleOutputRequest.CharInfo, lpBuffer, Size);
 
   /* Set up the data to send to the Console Server */
   CsrRequest = MAKE_CSR_API(WRITE_CONSOLE_OUTPUT, CSR_CONSOLE);