[ros-diffs] [greatlrd] 24788: adding a wcsstrlen to make msg "Unable to start , error" when no screensaver have been set. I hope it is all check we need. hpousin if u dislike this check u are wellcome to remove it.

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Sun Nov 19 21:35:12 CET 2006


Author: greatlrd
Date: Sun Nov 19 23:35:11 2006
New Revision: 24788

URL: http://svn.reactos.org/svn/reactos?rev=24788&view=rev
Log:
adding a  wcsstrlen to make msg "Unable to start , error" when no screensaver have been set. 
I hope it is all check we need. hpousin if u dislike this check u are wellcome to remove it. 
 

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/screensaver.c?rev=24788&r1=24787&r2=24788&view=diff
==============================================================================
--- trunk/reactos/base/system/winlogon/screensaver.c (original)
+++ trunk/reactos/base/system/winlogon/screensaver.c Sun Nov 19 23:35:11 2006
@@ -274,7 +274,11 @@
 
 	if (bufferSize == 0)
 		goto cleanup;
-	szApplicationName[bufferSize] = 0; /* Terminate the string */
+	
+    szApplicationName[bufferSize] = 0; /* Terminate the string */
+
+    if (wcslen(szApplicationName) == 0)
+		goto cleanup;
 
 	wsprintfW(szCommandLine, L"%s /s", szApplicationName);
 	TRACE("WL: Executing %S\n", szCommandLine);




More information about the Ros-diffs mailing list