Author: jgardou
Date: Sat Oct 4 21:24:16 2014
New Revision: 64529
URL:
http://svn.reactos.org/svn/reactos?rev=64529&view=rev
Log:
[USETUP]
- Fix potential buffer overflow
Modified:
trunk/reactos/base/setup/usetup/fslist.c
Modified: trunk/reactos/base/setup/usetup/fslist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/fslist.c…
==============================================================================
--- trunk/reactos/base/setup/usetup/fslist.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/fslist.c [iso-8859-1] Sat Oct 4 21:24:16 2014
@@ -166,12 +166,12 @@
if (Item->FileSystem)
{
if (Item->QuickFormat)
- sprintf(Buffer, MUIGetString(STRING_FORMATDISK1), Item->FileSystem);
+ snprintf(Buffer, sizeof(Buffer), MUIGetString(STRING_FORMATDISK1),
Item->FileSystem);
else
- sprintf(Buffer, MUIGetString(STRING_FORMATDISK2), Item->FileSystem);
+ snprintf(Buffer, sizeof(Buffer), MUIGetString(STRING_FORMATDISK2),
Item->FileSystem);
}
else
- sprintf(Buffer, MUIGetString(STRING_KEEPFORMAT));
+ snprintf(Buffer, sizeof(Buffer), MUIGetString(STRING_KEEPFORMAT));
if (ListEntry == &List->Selected->ListEntry)
CONSOLE_SetInvertedTextXY(List->Left,