mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 09:03:25 +00:00
Change vsprint to _vsnprintf in PrintString to prevent potential buffer overflows. Patch by Uwe Matthaeus <uwe.matthaeus@guehring.de>.
svn path=/trunk/; revision=12894
This commit is contained in:
parent
c7d2525d45
commit
ad6ee8a5e1
1 changed files with 2 additions and 1 deletions
|
@ -60,7 +60,8 @@ PrintString(char* fmt,...)
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
vsprintf(buffer, fmt, ap);
|
_vsnprintf(buffer, sizeof(buffer) - 1, fmt, ap);
|
||||||
|
buffer[sizeof(buffer) - 1] = 0;
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
HalDisplayString(buffer);
|
HalDisplayString(buffer);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue