From 91deba1d5e54638b6bdd5beb1d2790fe5522d147 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sun, 30 Mar 2003 03:08:52 +0000 Subject: [PATCH] Clear the entire request, not just the end, in case it contains padding bytes. --- include/wine/server.h | 5 +---- scheduler/client.c | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/include/wine/server.h b/include/wine/server.h index 931f3f7c157..acde06776f7 100644 --- a/include/wine/server.h +++ b/include/wine/server.h @@ -42,7 +42,6 @@ struct __server_request_info union generic_request req; /* request structure */ union generic_reply reply; /* reply structure */ } u; - size_t size; /* size of request structure */ unsigned int data_count; /* count of request data pointers */ void *reply_data; /* reply data pointer */ struct __server_iovec data[__SERVER_MAX_DATA]; /* request variable size data */ @@ -96,10 +95,8 @@ inline static void wine_server_set_reply( void *req_ptr, void *ptr, unsigned int struct __server_request_info __req; \ struct type##_request * const req = &__req.u.req.type##_request; \ const struct type##_reply * const reply = &__req.u.reply.type##_reply; \ + memset( &__req.u.req, 0, sizeof(__req.u.req) ); \ __req.u.req.request_header.req = REQ_##type; \ - __req.u.req.request_header.request_size = 0; \ - __req.u.req.request_header.reply_size = 0; \ - __req.size = sizeof(*req); \ __req.data_count = 0; \ (void)reply; \ do diff --git a/scheduler/client.c b/scheduler/client.c index 2b1b36ef0f6..8d3a554348f 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -222,7 +222,6 @@ unsigned int wine_server_call( void *req_ptr ) struct __server_request_info * const req = req_ptr; sigset_t old_set; - memset( (char *)&req->u.req + req->size, 0, sizeof(req->u.req) - req->size ); sigprocmask( SIG_BLOCK, &block_set, &old_set ); send_request( req ); wait_reply( req );