From 3a79dade5f486ae61fff399cba80e18206cc1265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 19 Jul 2013 22:32:34 +0000 Subject: [PATCH] [SMSS] - In the token parsing function SmpParseToken, just return success directly if the input string has zero length, instead of running code which does nothing at the end, because the length was zero... - Give a default value for the "BootExecute" entry in the SMSS registry configuration table (this value is used when there is no BootExecute registry value inside HKLM\System\CurrentControlSet\Control\Session Manager) and precise that it is a multi-string value. - Remove a redundant "Environment" entry in this table, too. svn path=/trunk/; revision=59518 --- reactos/base/system/smss/sminit.c | 14 ++------------ reactos/base/system/smss/smutil.c | 3 +++ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/reactos/base/system/smss/sminit.c b/reactos/base/system/smss/sminit.c index 2e0e006edee..1f28e5ff93e 100644 --- a/reactos/base/system/smss/sminit.c +++ b/reactos/base/system/smss/sminit.c @@ -630,8 +630,8 @@ SmpRegistryConfigurationTable[] = 0, L"BootExecute", &SmpBootExecuteList, - REG_NONE, - NULL, + REG_MULTI_SZ, + L"autocheck AutoChk.exe *\0", 0 }, @@ -725,16 +725,6 @@ SmpRegistryConfigurationTable[] = 0 }, - { - SmpConfigureEnvironment, - RTL_QUERY_REGISTRY_SUBKEY, - L"Environment", - NULL, - REG_NONE, - NULL, - 0 - }, - { SmpConfigureSubSystems, RTL_QUERY_REGISTRY_SUBKEY, diff --git a/reactos/base/system/smss/smutil.c b/reactos/base/system/smss/smutil.c index 667cbd1e7e4..e50f2ff3f7a 100644 --- a/reactos/base/system/smss/smutil.c +++ b/reactos/base/system/smss/smutil.c @@ -162,6 +162,9 @@ SmpParseToken(IN PUNICODE_STRING Input, /* Save the input length */ InputLength = Input->Length; + /* If the input string is empty, just return */ + if (InputLength == 0) return STATUS_SUCCESS; + /* Parse the buffer until the first character */ p = Input->Buffer; Length = 0;