Hans Leidekker : wldap32: Fix overrun by one of static array.

Alexandre Julliard julliard at wine.codeweavers.com
Sat Apr 8 13:12:28 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 42af5f39507bec42a61f7f644888c13b15d66df1
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=42af5f39507bec42a61f7f644888c13b15d66df1

Author: Hans Leidekker <hans at it.vu.nl>
Date:   Sat Apr  8 16:11:48 2006 +0200

wldap32: Fix overrun by one of static array.

---

 dlls/wldap32/error.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/wldap32/error.c b/dlls/wldap32/error.c
index 265a99b..7ec348d 100644
--- a/dlls/wldap32/error.c
+++ b/dlls/wldap32/error.c
@@ -284,7 +284,7 @@ ULONG LdapMapErrorToWin32( ULONG err )
 {
     TRACE( "(0x%08lx)\n", err );
 
-    if (err > sizeof(WLDAP32_errormap)/sizeof(WLDAP32_errormap[0]))
+    if (err >= sizeof(WLDAP32_errormap)/sizeof(WLDAP32_errormap[0]))
         return ERROR_DS_GENERIC_ERROR;
     return WLDAP32_errormap[err];
 }




More information about the wine-cvs mailing list