Commit 64a41a28 authored by Alexandre Julliard's avatar Alexandre Julliard

The server also needs to cope with IMAGE_SCN_CNT_UNINITIALIZED_DATA

and IMAGE_SCN_CNT_INITIALIZED_DATA flags set together.
parent 415dfa63
......@@ -158,7 +158,8 @@ static int build_shared_mapping( struct mapping *mapping, int fd,
if (!(sec[i].Characteristics & IMAGE_SCN_MEM_WRITE)) continue;
if (lseek( shared_fd, pos, SEEK_SET ) != pos) goto error;
pos += ROUND_SIZE( 0, sec[i].Misc.VirtualSize );
if (sec[i].Characteristics & IMAGE_SCN_CNT_UNINITIALIZED_DATA) continue;
if ((sec[i].Characteristics & IMAGE_SCN_CNT_UNINITIALIZED_DATA) &&
!(sec[i].Characteristics & IMAGE_SCN_CNT_INITIALIZED_DATA)) continue;
if (!sec[i].PointerToRawData || !sec[i].SizeOfRawData) continue;
if (lseek( fd, sec[i].PointerToRawData, SEEK_SET ) != sec[i].PointerToRawData) goto error;
toread = sec[i].SizeOfRawData;
......
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