Commit b54e9e94 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Don't round up the header size for image mappings.

parent 9eae2d71
...@@ -105,9 +105,6 @@ static void init_page_size(void) ...@@ -105,9 +105,6 @@ static void init_page_size(void)
} }
#endif /* __i386__ */ #endif /* __i386__ */
#define ROUND_SIZE_MASK(addr,size,mask) \
(((int)(size) + ((int)(addr) & (mask)) + (mask)) & ~(mask))
#define ROUND_SIZE(size) (((size) + page_mask) & ~page_mask) #define ROUND_SIZE(size) (((size) + page_mask) & ~page_mask)
...@@ -246,8 +243,7 @@ static int get_image_params( struct mapping *mapping ) ...@@ -246,8 +243,7 @@ static int get_image_params( struct mapping *mapping )
mapping->size = ROUND_SIZE( nt.OptionalHeader.SizeOfImage ); mapping->size = ROUND_SIZE( nt.OptionalHeader.SizeOfImage );
mapping->base = (void *)nt.OptionalHeader.ImageBase; mapping->base = (void *)nt.OptionalHeader.ImageBase;
mapping->header_size = ROUND_SIZE_MASK( mapping->base, nt.OptionalHeader.SizeOfHeaders, mapping->header_size = nt.OptionalHeader.SizeOfHeaders;
nt.OptionalHeader.SectionAlignment - 1 );
mapping->protect = VPROT_IMAGE; mapping->protect = VPROT_IMAGE;
/* sanity check */ /* sanity check */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment