https://git.reactos.org/?p=reactos.git;a=commitdiff;h=16daf6700a30401699005…
commit 16daf6700a30401699005b6f798c73689b6223d9
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Tue May 15 15:45:31 2018 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Tue May 15 15:45:31 2018 +0200
[USETUP] Improve the install path checks
- Path must not contain whitespace characters.
- Path must be at least 2 characters long.
- Path must start with a backslash.
- Path must not end with a backslash.
- Path components must not end with a dot.
CORE-9529
---
base/setup/usetup/filesup.c | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/base/setup/usetup/filesup.c b/base/setup/usetup/filesup.c
index 4238557bbe..4dfd7d40b6 100644
--- a/base/setup/usetup/filesup.c
+++ b/base/setup/usetup/filesup.c
@@ -140,13 +140,38 @@ IsValidPath(
// TODO: Add check for 8.3 too.
- /* Check for whitespaces */
+ /* Path must be at least 2 characters long */
+ if (Length < 2)
+ return FALSE;
+
+ /* Path must start with a backslash */
+ if (InstallDir[0] != L'\\')
+ return FALSE;
+
+ /* Path must not end with a backslash */
+ if (InstallDir[Length - 1] == L'\\')
+ return FALSE;
+
+ /* Path must not contain whitespace characters */
for (i = 0; i < Length; i++)
{
if (isspace(InstallDir[i]))
return FALSE;
}
+ /* Path component must not end with a dot */
+ for (i = 0; i < Length; i++)
+ {
+ if (InstallDir[i] == L'\\' && i > 0)
+ {
+ if (InstallDir[i - 1] == L'.')
+ return FALSE;
+ }
+ }
+
+ if (InstallDir[Length - 1] == L'.')
+ return FALSE;
+
return TRUE;
}
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7e9b628bb8016aa756b7f…
commit 7e9b628bb8016aa756b7fd7e97f5822e9ede0e3a
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Mon May 14 23:35:48 2018 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Mon May 14 23:35:48 2018 +0200
[USETUP] Fix the name of the backspace key in the german translation
CORE-14006
---
base/setup/usetup/lang/de-DE.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/base/setup/usetup/lang/de-DE.h b/base/setup/usetup/lang/de-DE.h
index 2184ebeaf6..6372cee3f1 100644
--- a/base/setup/usetup/lang/de-DE.h
+++ b/base/setup/usetup/lang/de-DE.h
@@ -983,7 +983,7 @@ static MUI_ENTRY deDEInstallDirectoryEntries[] =
{
6,
15,
- "Benutzen Sie die Entf-TASTE, um Zeichen zu l�schen.",
+ "Benutzen Sie die R�ck-TASTE, um Zeichen zu l�schen.",
TEXT_STYLE_NORMAL
},
{