Rob Shearman : ntdll: Fix the index check in RtlGetAce.
Alexandre Julliard
julliard at winehq.org
Wed Jan 23 05:25:02 CST 2008
Module: wine
Branch: master
Commit: 21e2caa484ecd0051bad5333fdc0843b71448c11
URL: http://source.winehq.org/git/wine.git/?a=commit;h=21e2caa484ecd0051bad5333fdc0843b71448c11
Author: Rob Shearman <rob at codeweavers.com>
Date: Tue Jan 22 15:36:09 2008 +0000
ntdll: Fix the index check in RtlGetAce.
The index is zero based so we should obviously be returning
STATUS_INVALID_PARAMETER if the index is equal to the ACE count.
---
dlls/ntdll/sec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c
index 5a1fe89..ea24414 100644
--- a/dlls/ntdll/sec.c
+++ b/dlls/ntdll/sec.c
@@ -1341,7 +1341,7 @@ NTSTATUS WINAPI RtlGetAce(PACL pAcl,DWORD dwAceIndex,LPVOID *pAce )
TRACE("(%p,%d,%p)\n",pAcl,dwAceIndex,pAce);
- if (dwAceIndex > pAcl->AceCount)
+ if (dwAceIndex >= pAcl->AceCount)
return STATUS_INVALID_PARAMETER;
ace = (PACE_HEADER)(pAcl + 1);
More information about the wine-cvs
mailing list