Alexandre Julliard : mountmgr: Return the drive type even when the buffer is too small.

Alexandre Julliard julliard at winehq.org
Tue Nov 11 08:35:34 CST 2008


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Nov 10 16:11:05 2008 +0100

mountmgr: Return the drive type even when the buffer is too small.

---

 dlls/mountmgr.sys/mountmgr.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c
index 3c1aa88..987040e 100644
--- a/dlls/mountmgr.sys/mountmgr.c
+++ b/dlls/mountmgr.sys/mountmgr.c
@@ -287,9 +287,17 @@ static NTSTATUS query_unix_drive( const void *in_buff, SIZE_T insize,
 
     if (size > outsize)
     {
+        iosb->Information = 0;
         if (size >= FIELD_OFFSET( struct mountmgr_unix_drive, size ) + sizeof(output->size))
+        {
             output->size = size;
-        iosb->Information = FIELD_OFFSET( struct mountmgr_unix_drive, size ) + sizeof(output->size);
+            iosb->Information = FIELD_OFFSET( struct mountmgr_unix_drive, size ) + sizeof(output->size);
+        }
+        if (size >= FIELD_OFFSET( struct mountmgr_unix_drive, type ) + sizeof(output->type))
+        {
+            output->type = type;
+            iosb->Information = FIELD_OFFSET( struct mountmgr_unix_drive, type ) + sizeof(output->type);
+        }
         return STATUS_MORE_ENTRIES;
     }
     output->size = size;




More information about the wine-cvs mailing list