From af6bd749fd1d453f68fb5b22914a8811e916f8dd Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 3 Aug 2015 14:27:31 +0300 Subject: remove dependency on compiler flags that supress generated calls to memcpy and memset. --- src/object/ntapi_tt_keyed_object_directory.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/object') 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, -- cgit v1.2.3