Module: wine Branch: master Commit: 8227c030732f8e27283b495a0f310400e19c132e URL: http://source.winehq.org/git/wine.git/?a=commit;h=8227c030732f8e27283b495a0f...
Author: Alexandre Julliard julliard@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;