Author: hpoussin
Date: Tue Nov 14 21:35:29 2006
New Revision: 24758
URL:
http://svn.reactos.org/svn/reactos?rev=24758&view=rev
Log:
Don't force screensaver file names to have at least 4 chars
Terminate the string just after the last read character.
Modified:
trunk/reactos/base/system/winlogon/screensaver.c
Modified: trunk/reactos/base/system/winlogon/screensaver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/winlogon/scree…
==============================================================================
--- trunk/reactos/base/system/winlogon/screensaver.c (original)
+++ trunk/reactos/base/system/winlogon/screensaver.c Tue Nov 14 21:35:29 2006
@@ -262,7 +262,6 @@
if (rc != ERROR_SUCCESS)
goto cleanup;
- szApplicationName[bufferSize] = 0; /* Terminate the string */
rc = RegQueryValueExW(
hKey,
L"SCRNSAVE.EXE",
@@ -272,9 +271,10 @@
&bufferSize);
if (rc != ERROR_SUCCESS || dwType != REG_SZ)
goto cleanup;
-
- if (bufferSize <=4)
- goto cleanup;
+
+ if (bufferSize == 0)
+ goto cleanup;
+ szApplicationName[bufferSize] = 0; /* Terminate the string */
wsprintfW(szCommandLine, L"%s /s", szApplicationName);
TRACE("WL: Executing %S\n", szCommandLine);