Dmitry Timoshkov : server: Store correct protection for an image mapping.
Alexandre Julliard
julliard at winehq.org
Tue Jan 24 14:25:30 CST 2012
Module: wine
Branch: master
Commit: 29b91206a85878b43a31a7ab2dba7d62e33f7457
URL: http://source.winehq.org/git/wine.git/?a=commit;h=29b91206a85878b43a31a7ab2dba7d62e33f7457
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Tue Jan 24 17:44:56 2012 +0800
server: Store correct protection for an image mapping.
---
server/mapping.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/mapping.c b/server/mapping.c
index f37016f..90956e9 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -395,7 +395,7 @@ static int build_shared_mapping( struct mapping *mapping, int fd,
}
/* retrieve the mapping parameters for an executable (PE) image */
-static int get_image_params( struct mapping *mapping, int unix_fd )
+static int get_image_params( struct mapping *mapping, int unix_fd, int protect )
{
IMAGE_DOS_HEADER dos;
IMAGE_SECTION_HEADER *sec = NULL;
@@ -453,7 +453,7 @@ static int get_image_params( struct mapping *mapping, int unix_fd )
if (mapping->shared_file) list_add_head( &shared_list, &mapping->shared_entry );
- mapping->protect = VPROT_IMAGE;
+ mapping->protect = protect;
free( sec );
return 1;
@@ -523,7 +523,7 @@ static struct object *create_mapping( struct directory *root, const struct unico
if ((unix_fd = get_unix_fd( mapping->fd )) == -1) goto error;
if (protect & VPROT_IMAGE)
{
- if (!get_image_params( mapping, unix_fd )) goto error;
+ if (!get_image_params( mapping, unix_fd, protect )) goto error;
return &mapping->obj;
}
if (fstat( unix_fd, &st ) == -1)
More information about the wine-cvs
mailing list