[PATCH 0/1] MR2111: nsiproxy: Avoid calling RtlInitUnicodeString on a static constant.
From: Alex Henrie <alexhenrie24(a)gmail.com> --- dlls/nsiproxy.sys/device.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/nsiproxy.sys/device.c b/dlls/nsiproxy.sys/device.c index 4528e934991..87d634ff5c0 100644 --- a/dlls/nsiproxy.sys/device.c +++ b/dlls/nsiproxy.sys/device.c @@ -305,13 +305,11 @@ static NTSTATUS WINAPI nsi_ioctl( DEVICE_OBJECT *device, IRP *irp ) static int add_device( DRIVER_OBJECT *driver ) { - UNICODE_STRING name, link; + UNICODE_STRING name = RTL_CONSTANT_STRING( L"\\Device\\Nsi" ); + UNICODE_STRING link = RTL_CONSTANT_STRING( L"\\??\\Nsi" ); DEVICE_OBJECT *device; NTSTATUS status; - RtlInitUnicodeString( &name, L"\\Device\\Nsi" ); - RtlInitUnicodeString( &link, L"\\??\\Nsi" ); - if (!(status = IoCreateDevice( driver, 0, &name, FILE_DEVICE_NETWORK, FILE_DEVICE_SECURE_OPEN, FALSE, &device ))) status = IoCreateSymbolicLink( &link, &name ); if (status) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2111
This merge request was approved by Huw Davies. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2111
participants (3)
-
Alex Henrie -
Alex Henrie (@alexhenrie) -
Huw Davies (@huw)