mirror of
https://github.com/reactos/reactos.git
synced 2025-05-29 14:08:22 +00:00
[USETUP]
Restrict valid characters of the install path to: - Letters - Digits - Dots (.) - Backslashes (\) - Dashes (-) - Underscores (_) CORE-6179 #resolve svn path=/trunk/; revision=68307
This commit is contained in:
parent
0bc85fb9f3
commit
7c3f4c94a4
1 changed files with 9 additions and 4 deletions
|
@ -3080,6 +3080,7 @@ InstallDirectoryPage(PINPUT_RECORD Ir)
|
||||||
PDISKENTRY DiskEntry;
|
PDISKENTRY DiskEntry;
|
||||||
PPARTENTRY PartEntry;
|
PPARTENTRY PartEntry;
|
||||||
WCHAR InstallDir[51];
|
WCHAR InstallDir[51];
|
||||||
|
WCHAR c;
|
||||||
ULONG Length;
|
ULONG Length;
|
||||||
|
|
||||||
/* We do not need the filsystem list any more */
|
/* We do not need the filsystem list any more */
|
||||||
|
@ -3157,10 +3158,14 @@ InstallDirectoryPage(PINPUT_RECORD Ir)
|
||||||
{
|
{
|
||||||
if (Length < 50)
|
if (Length < 50)
|
||||||
{
|
{
|
||||||
InstallDir[Length] = (WCHAR)Ir->Event.KeyEvent.uChar.AsciiChar;
|
c = (WCHAR)Ir->Event.KeyEvent.uChar.AsciiChar;
|
||||||
Length++;
|
if (iswalpha(c) || iswdigit(c) || c == '.' || c == '\\' || c == '-' || c == '_')
|
||||||
InstallDir[Length] = 0;
|
{
|
||||||
CONSOLE_SetInputTextXY(8, 11, 51, InstallDir);
|
InstallDir[Length] = c;
|
||||||
|
Length++;
|
||||||
|
InstallDir[Length] = 0;
|
||||||
|
CONSOLE_SetInputTextXY(8, 11, 51, InstallDir);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue