Commit 8227c030 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 90ff8293
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment