mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 09:22:55 +00:00
[KERNEL32]
Clean-up IntReadConsoleOutputCode a little bit. [CONSRV] Fix a buffer overflow in SrvReadConsoleOutputString, which was translated sometimes into heap corruption and assert, triggered when freeing a remote captured buffer in csrsrv, when executing kernel32_winetest console, just during a call to ReadConsoleOutputCharacterA. Nevertheless I still keep the culprit code (commented-out now) because it might be useful in the future. svn path=/branches/ros-csrss/; revision=58229
This commit is contained in:
parent
6d28ec8640
commit
7846f054ff
2 changed files with 28 additions and 35 deletions
|
@ -862,20 +862,20 @@ CSR_API(SrvReadConsoleOutputString)
|
|||
}
|
||||
}
|
||||
|
||||
switch (CodeType)
|
||||
{
|
||||
case CODE_UNICODE:
|
||||
*(PWCHAR)ReadBuffer = 0;
|
||||
break;
|
||||
// switch (CodeType)
|
||||
// {
|
||||
// case CODE_UNICODE:
|
||||
// *(PWCHAR)ReadBuffer = 0;
|
||||
// break;
|
||||
|
||||
case CODE_ASCII:
|
||||
*(PCHAR)ReadBuffer = 0;
|
||||
break;
|
||||
// case CODE_ASCII:
|
||||
// *(PCHAR)ReadBuffer = 0;
|
||||
// break;
|
||||
|
||||
case CODE_ATTRIBUTE:
|
||||
*(PWORD)ReadBuffer = 0;
|
||||
break;
|
||||
}
|
||||
// case CODE_ATTRIBUTE:
|
||||
// *(PWORD)ReadBuffer = 0;
|
||||
// break;
|
||||
// }
|
||||
|
||||
ReadOutputCodeRequest->EndCoord.X = Xpos;
|
||||
ReadOutputCodeRequest->EndCoord.Y = (Ypos - Buff->VirtualY + Buff->MaxY) % Buff->MaxY;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue