[PATCH 1/3] ntdll: Implemenent ObjectTypeInformation class support in NtQueryObject.
Nikolay Sivov
bunglehead at gmail.com
Mon Jun 1 07:01:04 CDT 2015
On 01.06.2015 12:52, Qian Hong wrote:
> Hi,
>
> This patch fixed QQ crashing on recent Wine. Thanks Sebastian for
> improving my patch.
> Tested with wine-staging for weeks.
>
> ---
> dlls/ntdll/om.c | 64
> +++++++++++++++++++++++++++++++++++++++++++++++++++
> dlls/ntdll/tests/om.c | 28 +++++++++++-----------
> server/directory.c | 5 ----
> server/handle.c | 18 +++++++++++++++
> server/object.h | 5 ++++
> server/protocol.def | 9 ++++++++
> 6 files changed, 110 insertions(+), 19 deletions(-)
>
> + if (!(status = server_get_unix_name( handle, &unix_name )))
> + {
> + static const WCHAR type_fileW[] = {'F','i','l','e','\0'};
> + int type_size = sizeof(type_fileW);
> +
> + if (len < sizeof(*p))
> + status = STATUS_INFO_LENGTH_MISMATCH;
> + else if (len < sizeof(*p) + type_size)
> + status = STATUS_BUFFER_OVERFLOW;
> + else
> + {
> + p->TypeName.Buffer = (WCHAR *)(p + 1);
> + p->TypeName.Length = type_size - sizeof(WCHAR);
> + p->TypeName.MaximumLength = type_size;
> + memcpy( p->TypeName.Buffer, type_fileW, type_size );
> +
> + }
> + if (used_len) *used_len = sizeof(*p) + type_size;
> + RtlFreeAnsiString( &unix_name );
> + break;
> + }
Why do you need a separate server call/special case for files?
More information about the wine-devel
mailing list