Torge Matthies : server: Fix page size calculation in write access check.

Alexandre Julliard julliard at winehq.org
Thu Feb 25 16:45:36 CST 2021


Module: wine
Branch: master
Commit: 102a0b189bafec7f736be376d121801aa473fe48
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=102a0b189bafec7f736be376d121801aa473fe48

Author: Torge Matthies <openglfreak at googlemail.com>
Date:   Wed Feb 24 20:53:33 2021 +0100

server: Fix page size calculation in write access check.

Signed-off-by: Torge Matthies <openglfreak at googlemail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 server/ptrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/ptrace.c b/server/ptrace.c
index 49347791d8c..88c176d2d0c 100644
--- a/server/ptrace.c
+++ b/server/ptrace.c
@@ -410,10 +410,10 @@ int read_process_memory( struct process *process, client_ptr_t ptr, data_size_t
 }
 
 /* make sure we can write to the whole address range */
-/* len is the total size (in ints) */
+/* len is the total size (in longs) */
 static int check_process_write_access( struct thread *thread, long *addr, data_size_t len )
 {
-    int page = get_page_size() / sizeof(int);
+    int page = get_page_size() / sizeof(long);
 
     for (;;)
     {




More information about the wine-cvs mailing list