From c55cce6fcbadca3d5b5fd4e2a434ada2c2012479 Mon Sep 17 00:00:00 2001 From: Fabian Maurer Date: Thu, 16 Nov 2023 19:54:07 +0100 Subject: [PATCH] server: Initialize pe image struct padding to avoid Valgrind warning. --- include/wine/server_protocol.h | 3 ++- server/mapping.c | 1 + server/protocol.def | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 15156a12353..139a7bca69e 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -844,6 +844,7 @@ typedef struct unsigned char contains_code : 1; unsigned char wine_builtin : 1; unsigned char wine_fakedll : 1; + unsigned char padding : 5; unsigned char image_flags; unsigned int loader_flags; unsigned int header_size; @@ -6506,7 +6507,7 @@ union generic_reply /* ### protocol_version begin ### */ -#define SERVER_PROTOCOL_VERSION 785 +#define SERVER_PROTOCOL_VERSION 786 /* ### protocol_version end ### */ diff --git a/server/mapping.c b/server/mapping.c index a795dc4b38b..b5684c484d2 100644 --- a/server/mapping.c +++ b/server/mapping.c @@ -842,6 +842,7 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s return STATUS_INVALID_IMAGE_FORMAT; } + mapping->image.padding = 0; mapping->image.map_addr = get_fd_map_address( mapping->fd ); mapping->image.image_charact = nt.FileHeader.Characteristics; mapping->image.machine = nt.FileHeader.Machine; diff --git a/server/protocol.def b/server/protocol.def index b4d6d74d6fc..5d60e7fcda3 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -860,6 +860,7 @@ typedef struct unsigned char contains_code : 1; unsigned char wine_builtin : 1; unsigned char wine_fakedll : 1; + unsigned char padding : 5; unsigned char image_flags; unsigned int loader_flags; unsigned int header_size;