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?
Hi Nikolay,
On Mon, Jun 1, 2015 at 8:01 PM, Nikolay Sivov bunglehead@gmail.com wrote:
Why do you need a separate server call/special case for files?
Thanks again for pointing out this, I just sent a new version which removes special case for files.
Also, do we really need to transfer a string? It seems to be that you can use an index and a static array at ntdll side.
Good points. As we discussed in IRC, let's keep the change minimal in this iteration and wait for AJ's opinion. Maybe if there is a change need to done here AJ might prefer to do by himself :)