Author: mjmartin
Date: Sun Apr 18 14:06:29 2010
New Revision: 46916

URL: http://svn.reactos.org/svn/reactos?rev=46916&view=rev
Log:
[NTMARTA]
- AccRewriteSetEntriesInAcl: Fix a bug that caused the for loop never to 
complete due to reuse of same variable.

Modified:
    trunk/reactos/dll/win32/ntmarta/ntmarta.c

Modified: trunk/reactos/dll/win32/ntmarta/ntmarta.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ntmarta/ntmarta.c?rev=46916&r1=46915&r2=46916&view=diff
==============================================================================
--- trunk/reactos/dll/win32/ntmarta/ntmarta.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ntmarta/ntmarta.c [iso-8859-1] Sun Apr 18 14:06:29 
2010
@@ -1236,7 +1236,7 @@
     DWORD ObjectsPresent;
     BOOL needToClean;
     PSID pSid1, pSid2;
-    ULONG i;
+    ULONG i, j;
     LSA_HANDLE PolicyHandle = NULL;
     BOOL bRet;
     DWORD LastErr;
@@ -1295,11 +1295,11 @@
             case REVOKE_ACCESS:
             case SET_ACCESS:
                 /* Discard all accesses for the trustee... */
-                for (i = 0; i < SizeInformation.AceCount; i++)
+                for (j = 0; j < SizeInformation.AceCount; j++)
                 {
-                    if (!pKeepAce[i])
+                    if (!pKeepAce[j])
                         continue;
-                    if (!GetAce(OldAcl, i, (PVOID*)&pAce))
+                    if (!GetAce(OldAcl, j, (PVOID*)&pAce))
                     {
                         Ret = GetLastError();
                         goto Cleanup;
@@ -1308,7 +1308,7 @@
                     pSid2 = AccpGetAceSid(pAce);
                     if (RtlEqualSid(pSid1, pSid2))
                     {
-                        pKeepAce[i] = FALSE;
+                        pKeepAce[j] = FALSE;
                         SizeInformation.AclBytesInUse -= pAce->AceSize;
                     }
                 }


Reply via email to