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

This commit is contained in:
Alexandre Julliard 2008-11-10 16:11:05 +01:00
parent 90ff82930a
commit 8227c03073
1 changed files with 9 additions and 1 deletions

View File

@ -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;