Fix a buffer overflow in OutputDebugStringA. Spotted by
mbealby(a)gmail.com.
Modified: trunk/reactos/lib/kernel32/debug/output.c
_____
Modified: trunk/reactos/lib/kernel32/debug/output.c
--- trunk/reactos/lib/kernel32/debug/output.c 2005-12-09 14:59:10 UTC
(rev 20007)
+++ trunk/reactos/lib/kernel32/debug/output.c 2005-12-09 17:06:02 UTC
(rev 20008)
@@ -397,10 +397,10 @@
nRoundLen = nOutputStringLen;
/* copy the current block into the buffer */
- memcpy(pDBMonBuffer->Buffer, _OutputString, nOutputStringLen);
+ memcpy(pDBMonBuffer->Buffer, _OutputString, nRoundLen);
/* null-terminate the current block */
- pDBMonBuffer->Buffer[nOutputStringLen] = 0;
+ pDBMonBuffer->Buffer[nRoundLen] = 0;
/* signal that the data contains meaningful data and can be read
*/
SetEvent(hDBMonDataReady);