- Fix potential buffer overflow

svn path=/trunk/; revision=64529
This commit is contained in:
Jérôme Gardou 2014-10-04 21:24:16 +00:00
parent 1282829615
commit 2c4c58547d

View file

@ -166,12 +166,12 @@ DrawFileSystemList(
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,