[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: [PATCH v3] ntoskrnl.exe: Implement IoGetDeviceProperty for DevicePropertyPhysicalDeviceObjectNam
From: Aric Stewart <aric () codeweavers ! com>
Date: 2016-01-29 14:31:48
Message-ID: 56AB77D4.7030807 () codeweavers ! com
[Download RAW message or body]
On 1/29/16 8:29 AM, Alexandre Julliard wrote:
> Aric Stewart <aric@codeweavers.com> writes:
>
> > + case DevicePropertyPhysicalDeviceObjectName:
> > + {
> > + ULONG used_len;
> > + OBJECT_NAME_INFORMATION *name = HeapAlloc(GetProcessHeap(), 0, \
> > buffer_length + (sizeof(OBJECT_NAME_INFORMATION))); +
> > + status = NtQueryObject(device->Reserved, ObjectNameInformation, \
> > name, buffer_length + sizeof(OBJECT_NAME_INFORMATION), &used_len); + \
> > if (status == STATUS_SUCCESS) + {
> > + memcpy(property_buffer, name->Name.Buffer, name->Name.Length);
> > + *result_length = name->Name.Length;
> > + }
> > + else
> > + *result_length = 0;
>
> Length is still not correct if the buffer is too small, and the string
> needs to be null-terminated.
>
Sorry you are correct I am trying to focus on too many divergent things at once and \
my brain has stated to turn to mush.
-aric
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic