https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2eb78afa7a9aa28361a83e87bffb93bf85b69c57

commit 2eb78afa7a9aa28361a83e87bffb93bf85b69c57
Author:     Hermès Bélusca-Maïto <[email protected]>
AuthorDate: Sat Mar 31 16:35:19 2018 +0200
Commit:     Hermès Bélusca-Maïto <[email protected]>
CommitDate: Sat Mar 31 17:06:29 2018 +0200

    [SC] Fix comparison logic for the allowed user-defined service control code 
interval. Caught by contributor 'mudhead'.
    CORE-14514
---
 base/applications/sc/sc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/base/applications/sc/sc.c b/base/applications/sc/sc.c
index c6230c4801..49cd597029 100644
--- a/base/applications/sc/sc.c
+++ b/base/applications/sc/sc.c
@@ -177,7 +177,7 @@ ScControl(LPCTSTR Server,       // remote machine name
             else
             {
                 ControlCode = _ttoi(ServiceArgs[0]);
-                if ((ControlCode < 128) && (ControlCode > 255))
+                if ((ControlCode < 128) || (ControlCode > 255))
                     ControlCode = 0;
             }
 

Reply via email to