Aleksey Bragin : ntdll: Fix memory corruption in RtlSetBits.

Alexandre Julliard julliard at winehq.org
Sat Dec 27 13:45:23 CST 2008


Module: wine
Branch: master
Commit: a8a97091fe3875b589db3612bec8377e30ad4199
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a8a97091fe3875b589db3612bec8377e30ad4199

Author: Aleksey Bragin <aleksey at reactos.org>
Date:   Fri Dec 26 23:52:25 2008 +0300

ntdll: Fix memory corruption in RtlSetBits.

---

 dlls/ntdll/rtlbitmap.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/rtlbitmap.c b/dlls/ntdll/rtlbitmap.c
index 3656d24..ef033b2 100644
--- a/dlls/ntdll/rtlbitmap.c
+++ b/dlls/ntdll/rtlbitmap.c
@@ -170,7 +170,8 @@ VOID WINAPI RtlSetBits(PRTL_BITMAP lpBits, ULONG ulStart, ULONG ulCount)
   }
 
   /* Set remaining bits, if any */
-  *lpOut |= NTDLL_maskBits[ulCount & 0x7];
+  if (ulCount & 0x7)
+    *lpOut |= NTDLL_maskBits[ulCount & 0x7];
 }
 
 /*************************************************************************




More information about the wine-cvs mailing list