https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bb33692400b3d59d6c907…
commit bb33692400b3d59d6c9070d339bf666b997b3624
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed Jan 30 16:54:45 2019 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Jan 30 16:54:45 2019 +0900
[WIN32SS][NTGDI] Use ProbeForWrite in NtGdiSetBitmapBits (#1325)
Use ProbeForWrite instead of ProbeForRead. CORE-15657 and CORE-15695
---
win32ss/gdi/ntgdi/bitmaps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/win32ss/gdi/ntgdi/bitmaps.c b/win32ss/gdi/ntgdi/bitmaps.c
index 0f556f9b91..59fb5dd9d1 100644
--- a/win32ss/gdi/ntgdi/bitmaps.c
+++ b/win32ss/gdi/ntgdi/bitmaps.c
@@ -645,7 +645,7 @@ NtGdiSetBitmapBits(
_SEH2_TRY
{
/* NOTE: Win2k3 doesn't check WORD alignment here. */
- ProbeForRead(pUnsafeBits, Bytes, 1);
+ ProbeForWrite(pUnsafeBits, Bytes, 1);
ret = UnsafeSetBitmapBits(psurf, Bytes, pUnsafeBits);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)