summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/object/ntapi_tt_keyed_object_directory.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/object/ntapi_tt_keyed_object_directory.c b/src/object/ntapi_tt_keyed_object_directory.c
index 7f2da40..abc9898 100644
--- a/src/object/ntapi_tt_keyed_object_directory.c
+++ b/src/object/ntapi_tt_keyed_object_directory.c
@@ -12,6 +12,8 @@
typedef ntapi_zw_open_directory_object objdir_open_fn;
+static nt_keyed_objdir_name __template_name = {__NT_BASED_NAMED_OBJECTS};
+
static int32_t __stdcall __tt_create_keyed_object_directory(
__out void ** hdir,
__in uint32_t desired_access,
@@ -20,7 +22,7 @@ static int32_t __stdcall __tt_create_keyed_object_directory(
__in uint32_t key,
__in objdir_open_fn * openfn)
{
- nt_keyed_objdir_name objdir_name = {__NT_BASED_NAMED_OBJECTS};
+ nt_keyed_objdir_name objdir_name;
nt_unicode_string name;
nt_oa oa;
nt_sqos sqos = {
@@ -29,6 +31,11 @@ static int32_t __stdcall __tt_create_keyed_object_directory(
NT_SECURITY_TRACKING_DYNAMIC,
1};
+ __ntapi->tt_generic_memcpy(
+ &objdir_name,
+ &__template_name,
+ sizeof(__template_name));
+
__ntapi->tt_memcpy_utf16(
objdir_name.prefix,
prefix,