diff options
author | midipix <writeonce@midipix.org> | 2016-05-11 15:05:35 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-05-14 07:18:25 -0400 |
commit | 1219beec442e63d47eb5bfb3b3bd7a7818b657c7 (patch) | |
tree | 75f4132b7fc19972d0a047148207d09a379c10a6 | |
parent | c713d8d019f7b0f9ed4a60912f440aca991d43c1 (diff) | |
download | ntapi-1219beec442e63d47eb5bfb3b3bd7a7818b657c7.tar.bz2 ntapi-1219beec442e63d47eb5bfb3b3bd7a7818b657c7.tar.xz |
code maintenance: properly initialize struct entities.
-rw-r--r-- | src/internal/ntapi.c | 12 | ||||
-rw-r--r-- | src/object/ntapi_tt_keyed_object_directory.c | 6 | ||||
-rw-r--r-- | src/process/ntapi_tt_init_runtime_data.c | 4 | ||||
-rw-r--r-- | src/socket/ntapi_sc_socket_v2.c | 2 |
4 files changed, 16 insertions, 8 deletions
diff --git a/src/internal/ntapi.c b/src/internal/ntapi.c index d201eeb..885fe61 100644 --- a/src/internal/ntapi.c +++ b/src/internal/ntapi.c @@ -67,8 +67,8 @@ static __ntapi_init_fn * __ntapi_init_vtbl[3] = { __ntapi_init_completed}; /* accessor */ -ntapi_vtbl ___ntapi = {0}; -ntapi_vtbl ___ntapi_shadow = {0}; +ntapi_vtbl ___ntapi; +ntapi_vtbl ___ntapi_shadow; /* .bss */ static __ntapi_img_sec_bss __ntapi_img_bss; @@ -77,8 +77,12 @@ static __ntapi_img_sec_bss __ntapi_img_bss; static union __ntapi_img_rdata __ntapi_rdata = {{ {__NTAPI_HASH_TABLE}, /* __ntapi_import_table */ 0, /* __ntapi */ - {{0}}, /* __session_name */ - 0}}; /* __internals */ + { /* __session_name */ + {0},0,{0}, + {0,{0},0}, + {{0},0,{0},0,{0},0,{0},0,{0},0,{0}}, + 0}, + 0}}; #define internals __ntapi_rdata.img_sec_data.__internals #define import_table __ntapi_rdata.img_sec_data.__ntapi_import_table diff --git a/src/object/ntapi_tt_keyed_object_directory.c b/src/object/ntapi_tt_keyed_object_directory.c index 9520607..311e051 100644 --- a/src/object/ntapi_tt_keyed_object_directory.c +++ b/src/object/ntapi_tt_keyed_object_directory.c @@ -12,7 +12,11 @@ typedef ntapi_zw_open_directory_object objdir_open_fn; -static nt_keyed_objdir_name __template_name = {__NT_BASED_NAMED_OBJECTS}; +static nt_keyed_objdir_name __template_name = {__NT_BASED_NAMED_OBJECTS, + 0, + {0,0,0,0,0,0}, + {0,{0},0}, + {0}}; static int32_t __stdcall __tt_create_keyed_object_directory( __out void ** hdir, diff --git a/src/process/ntapi_tt_init_runtime_data.c b/src/process/ntapi_tt_init_runtime_data.c index 836b609..211f6f3 100644 --- a/src/process/ntapi_tt_init_runtime_data.c +++ b/src/process/ntapi_tt_init_runtime_data.c @@ -15,7 +15,7 @@ int32_t __stdcall __ntapi_tt_update_runtime_data(nt_runtime_data * rtdata) int32_t status; nt_process_basic_information pbi; uint32_t ret; - nt_oa oa = {sizeof(oa)}; + nt_oa oa = {sizeof(oa),0,0,0,0,0}; /* process (self) */ rtdata->cid_self.process_id = pe_get_current_process_id(); @@ -48,7 +48,7 @@ int32_t __stdcall __ntapi_tt_init_runtime_data(nt_runtime_data * rtdata) { int32_t status; nt_peb * peb; - nt_oa oa = {sizeof(oa)}; + nt_oa oa = {sizeof(oa),0,0,0,0,0}; /* init */ __ntapi->tt_aligned_block_memset(rtdata,0,sizeof(*rtdata)); diff --git a/src/socket/ntapi_sc_socket_v2.c b/src/socket/ntapi_sc_socket_v2.c index 366b9c9..0f114fe 100644 --- a/src/socket/ntapi_sc_socket_v2.c +++ b/src/socket/ntapi_sc_socket_v2.c @@ -58,7 +58,7 @@ int32_t __cdecl __ntapi_sc_socket_v2( 0x0f, 0x20, {'A','f','d','O','p','e','n','P','a','c','k','e','t','X','X',0}, - {0}, + {0,0,0,0,0}, {0}}; ea_length = sizeof(afd_ea); |