From e3982b40263c8cc20bfa79e707380e887928f8af Mon Sep 17 00:00:00 2001 From: midipix Date: Jul 04 2016 03:51:19 +0000 Subject: __ntapi_tt_port_name_from_attributes(): removed excess array elements. --- diff --git a/src/port/ntapi_port_name_helper.c b/src/port/ntapi_port_name_helper.c index 7ab4d41..bd55f5b 100644 --- a/src/port/ntapi_port_name_helper.c +++ b/src/port/ntapi_port_name_helper.c @@ -13,13 +13,13 @@ typedef wchar16_t __port_service_prefix[6]; static const __port_service_prefix __port_service_null = {0}; -static const __port_service_prefix __port_service_prefixes[6][NT_PORT_TYPE_CAP][NT_PORT_SUBTYPE_CAP] = { - {{{'s','v','c','a','n','y'}}}, - {{{'n','t','c','t','t','y'}}}, - {{{'v','m','o','u','n','t'}}}, - {{{'d','a','e','m','o','n'}}}, - {{{'s','y','m','l','n','k'}}}, - {{{'n','t','p','r','o','c'}}}}; +static const __port_service_prefix __port_service_prefixes[NT_PORT_TYPE_CAP][NT_PORT_SUBTYPE_CAP] = { + {{'s','v','c','a','n','y'}}, + {{'n','t','c','t','t','y'}}, + {{'v','m','o','u','n','t'}}, + {{'d','a','e','m','o','n'}}, + {{'s','y','m','l','n','k'}}, + {{'n','t','p','r','o','c'}}}; static const nt_guid __port_guids[NT_PORT_TYPE_CAP][NT_PORT_SUBTYPE_CAP] = { {NT_PORT_GUID_DEFAULT}, @@ -136,7 +136,7 @@ void __stdcall __ntapi_tt_port_name_from_attributes( if (attr && (attr->type < NT_PORT_TYPE_CAP) && (attr->subtype < NT_PORT_SUBTYPE_CAP)) __ntapi->tt_memcpy_utf16( name->svc_prefix, - &(__port_service_prefixes[attr->type][attr->subtype][0][0]), + __port_service_prefixes[attr->type][attr->subtype], sizeof(name->svc_prefix)); else __ntapi->tt_memcpy_utf16(