From db80e169c75af75e23f747739e89ce4c98732555 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 1 Apr 2020 17:08:26 +1100 Subject: [PATCH] Updated ntdll-NtDevicePath patchset --- ...l-Implement-opening-files-through-nt-device-path.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/patches/ntdll-NtDevicePath/0001-ntdll-Implement-opening-files-through-nt-device-path.patch b/patches/ntdll-NtDevicePath/0001-ntdll-Implement-opening-files-through-nt-device-path.patch index f7ec3960..961d5b00 100644 --- a/patches/ntdll-NtDevicePath/0001-ntdll-Implement-opening-files-through-nt-device-path.patch +++ b/patches/ntdll-NtDevicePath/0001-ntdll-Implement-opening-files-through-nt-device-path.patch @@ -90,7 +90,7 @@ index 32699fe3cc4..97b42398bb0 100644 + while (!NtQueryDirectoryObject( handle, info, sizeof(data), TRUE, FALSE, &ctx, NULL )) + { + if (read_nt_symlink( handle, &info->ObjectName, symlinkW, MAX_DIR_ENTRY_LEN )) continue; -+ if (strlenW( symlinkW ) != length || memicmpW( symlinkW, name, length )) continue; ++ if (wcslen( symlinkW ) != length || memicmpW( symlinkW, name, length )) continue; + if (info->ObjectName.Length != 2 * sizeof(WCHAR) || info->ObjectName.Buffer[1] != ':') continue; + + *device_ret = info->ObjectName.Buffer[0]; @@ -139,7 +139,7 @@ index 32699fe3cc4..97b42398bb0 100644 + else + return nt_to_unix_file_name_internal( nameW, unix_name_ret, disposition, check_case ); + -+ name_len = sizeof(dosprefixW) + strlenW(prefix) * sizeof(WCHAR) + ++ name_len = sizeof(dosprefixW) + wcslen(prefix) * sizeof(WCHAR) + + nameW->Length - offset * sizeof(WCHAR) + sizeof(WCHAR); + if (!(name = RtlAllocateHeap( GetProcessHeap(), 0, name_len ))) + return STATUS_NO_MEMORY; @@ -147,8 +147,8 @@ index 32699fe3cc4..97b42398bb0 100644 + ptr = name; + memcpy( ptr, dosprefixW, sizeof(dosprefixW) ); + ptr += sizeof(dosprefixW) / sizeof(WCHAR); -+ strcpyW( ptr, prefix ); -+ ptr += strlenW(ptr); ++ wcscpy( ptr, prefix ); ++ ptr += wcslen(ptr); + memcpy( ptr, nameW->Buffer + offset, nameW->Length - offset * sizeof(WCHAR) ); + ptr[ nameW->Length / sizeof(WCHAR) - offset ] = 0; +