Alexandre Julliard : ntdll: Use the exact size of the manifest file.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 30 16:52:28 CDT 2007


Module: wine
Branch: master
Commit: 53285e2462d2c57e0a590e96ea355983f01751cd
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=53285e2462d2c57e0a590e96ea355983f01751cd

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jul 30 20:25:12 2007 +0200

ntdll: Use the exact size of the manifest file.

---

 dlls/ntdll/actctx.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
index 15b0c59..e0ebd15 100644
--- a/dlls/ntdll/actctx.c
+++ b/dlls/ntdll/actctx.c
@@ -1652,6 +1652,8 @@ static NTSTATUS get_manifest_in_pe_file( struct actctx_loader* acl, struct assem
 static NTSTATUS get_manifest_in_manifest_file( struct actctx_loader* acl, struct assembly_identity* ai,
                                                LPCWSTR filename, LPCWSTR directory, HANDLE file )
 {
+    FILE_END_OF_FILE_INFORMATION info;
+    IO_STATUS_BLOCK io;
     HANDLE              mapping;
     OBJECT_ATTRIBUTES   attr;
     LARGE_INTEGER       size;
@@ -1682,7 +1684,9 @@ static NTSTATUS get_manifest_in_manifest_file( struct actctx_loader* acl, struct
     NtClose( mapping );
     if (status != STATUS_SUCCESS) return status;
 
-    status = parse_manifest(acl, ai, filename, directory, base, count);
+    status = NtQueryInformationFile( file, &io, &info, sizeof(info), FileEndOfFileInformation );
+    if (status == STATUS_SUCCESS)
+        status = parse_manifest(acl, ai, filename, directory, base, info.EndOfFile.QuadPart);
 
     NtUnmapViewOfSection( GetCurrentProcess(), base );
     return status;




More information about the wine-cvs mailing list