@@ -63,7 +63,7 @@ dword_result_t NtCreateFile_entry(lpdword_t handle_out, dword_t desired_access,
6363 vfs::Entry* root_entry = nullptr ;
6464
6565 // Compute path, possibly attrs relative.
66- auto target_path = util::TranslateAnsiString (kernel_memory (), object_name);
66+ auto target_path = util::TranslateAnsiPath (kernel_memory (), object_name);
6767
6868 // Enforce that the path is ASCII.
6969 if (!IsValidPath (target_path, false )) {
@@ -462,7 +462,7 @@ dword_result_t NtQueryFullAttributesFile_entry(
462462 assert_always ();
463463 }
464464
465- auto target_path = util::TranslateAnsiString (kernel_memory (), object_name);
465+ auto target_path = util::TranslateAnsiPath (kernel_memory (), object_name);
466466
467467 // Enforce that the path is ASCII.
468468 if (!IsValidPath (target_path, false )) {
@@ -501,7 +501,7 @@ dword_result_t NtQueryDirectoryFile_entry(
501501 uint32_t info = 0 ;
502502
503503 auto file = kernel_state ()->object_table ()->LookupObject <XFile>(file_handle);
504- auto name = util::TranslateAnsiString (kernel_memory (), file_name);
504+ auto name = util::TranslateAnsiPath (kernel_memory (), file_name);
505505
506506 // Enforce that the path is ASCII.
507507 if (!IsValidPath (name, true )) {
@@ -558,7 +558,7 @@ dword_result_t NtOpenSymbolicLinkObject_entry(
558558 auto object_name =
559559 kernel_memory ()->TranslateVirtual <X_ANSI_STRING*>(object_attrs->name_ptr );
560560
561- auto target_path = util::TranslateAnsiString (kernel_memory (), object_name);
561+ auto target_path = util::TranslateAnsiPath (kernel_memory (), object_name);
562562
563563 // Enforce that the path is ASCII.
564564 if (!IsValidPath (target_path, false )) {
0 commit comments