Change vsprint to _vsnprintf in PrintString to prevent potential buffer overflows. Patch by Uwe Matthaeus <uwe.matthaeus@guehring.de>.
Modified: trunk/reactos/ntoskrnl/kd/kdebug.c
--- trunk/reactos/ntoskrnl/kd/kdebug.c 2005-01-08 22:08:29 UTC (rev 12893) +++ trunk/reactos/ntoskrnl/kd/kdebug.c 2005-01-08 23:36:03 UTC (rev 12894) @@ -60,7 +60,8 @@
va_list ap; va_start(ap, fmt);
- vsprintf(buffer, fmt, ap);
+ _vsnprintf(buffer, sizeof(buffer) - 1, fmt, ap);
+ buffer[sizeof(buffer) - 1] = 0;
va_end(ap); HalDisplayString(buffer);