https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6b8f9c0c2b00e0fdec83b…
commit 6b8f9c0c2b00e0fdec83b8fc99bf1b3a1d7b47f2
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sun Jan 27 16:11:23 2019 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Jan 27 16:11:23 2019 +0900
[WIN32SS][NTGDI] Alignment probe change in NtGdiSetBitmapBits (#1309)
Don't check WORD alignment in NtGdiSetBitmapBits to match Win2k3 behaviour.
CORE-15657
---
win32ss/gdi/ntgdi/bitmaps.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/win32ss/gdi/ntgdi/bitmaps.c b/win32ss/gdi/ntgdi/bitmaps.c
index e003640e9e..c98259967e 100644
--- a/win32ss/gdi/ntgdi/bitmaps.c
+++ b/win32ss/gdi/ntgdi/bitmaps.c
@@ -642,7 +642,8 @@ NtGdiSetBitmapBits(
_SEH2_TRY
{
- ProbeForRead(pUnsafeBits, Bytes, sizeof(WORD));
+ /* NOTE: Win2k3 doesn't check WORD alignment here. */
+ ProbeForRead(pUnsafeBits, Bytes, 1);
ret = UnsafeSetBitmapBits(psurf, Bytes, pUnsafeBits);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)