Author: fireball
Date: Fri Dec 26 14:21:52 2008
New Revision: 38359
URL:
http://svn.reactos.org/svn/reactos?rev=38359&view=rev
Log:
- Don't try to set remaining bits if there are none. Fixes memory
corruption.
Patch sent to Wine:
http://www.winehq.org/pipermail/wine-patches/2008-December/066716.html
Modified:
trunk/reactos/lib/rtl/bitmap.c
Modified: trunk/reactos/lib/rtl/bitmap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/bitmap.c?rev=38359…
==============================================================================
--- trunk/reactos/lib/rtl/bitmap.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/bitmap.c [iso-8859-1] Fri Dec 26 14:21:52 2008
@@ -851,7 +851,8 @@
}
/* Set remaining bits, if any */
- *lpOut |= NTDLL_maskBits[NumberToSet & 0x7];
+ if (NumberToSet & 0x7)
+ *lpOut |= NTDLL_maskBits[NumberToSet & 0x7];
}