Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-09-14 18:10:39 +0400
committerCorinna Vinschen <corinna@vinschen.de>2010-09-14 18:10:39 +0400
commit1df35772d6d2182a35cb2e3d07227b8765eef2d5 (patch)
treeab7174d428a28cd4bbe3fb6267d9896bcb23cb95 /winsup
parent27e79675f8b36204c04433a6519bcdb5c4511bd9 (diff)
* path.cc (symlink_info::check): Make sure AllocationSize and EndOfFile
are stored in the right order when fetching the info from the NtQueryDirectoryFile result.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/path.cc8
2 files changed, 14 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 80a705521..01ffad067 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+2010-09-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (symlink_info::check): Make sure AllocationSize and EndOfFile
+ are stored in the right order when fetching the info from the
+ NtQueryDirectoryFile result.
+
2010-09-13 Corinna Vinschen <corinna@vinschen.de>
* fhandler_process.cc (get_mem_values): Simplify code. Fix
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 470546586..d29aff028 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -2525,6 +2525,14 @@ restart:
{
fileattr = fdi_buf.fdi.FileAttributes;
memcpy (pfnoi, &fdi_buf.fdi.CreationTime, sizeof *pfnoi);
+ /* Amazing, but true: The FILE_NETWORK_OPEN_INFORMATION
+ structure has the AllocationSize and EndOfFile members
+ interchanged relative to the directory information
+ classes. */
+ pfnoi->AllocationSize.QuadPart
+ = fdi_buf.fdi.AllocationSize.QuadPart;
+ pfnoi->EndOfFile.QuadPart
+ = fdi_buf.fdi.EndOfFile.QuadPart;
}
}
ext_tacked_on = !!*ext_here;